Failed to run Face SDK components

Issue:

An error occurs when launching the Liveness or Search component.

Solution:

First of all, you need to check if all the settings are done correctly as described in our guide. Please make sure you follow all the installation and configuration steps consistently.

To check a possible issue you need to open a browser developer tool:

  • Google Chrome - to open the developer tools, you need to press the key combination Ctrl+Shift+I (or Cmd+Shift+I on Mac). Then, in the opened developer tools window, navigate to the Network tab and make the request. The error code will be displayed next to the request name.
  • In Firefox - to open the developer tools press the F12 key. Then, go to the Network tab and make the request that caused the error. The error code will be displayed in the Status column.

1. Status 405 or 404:

image.png

It means some steps of the guide weren't completed carefully, in this case, double-check that the installation has been done correctly.

2. CORS issue:

  1. If you see a message about CORS policy issues, you should check the server settings:
  2. The CORS settings include three parameters:
Parameter Description Default Value
FACEAPI_CORS_ORIGINS origin, allowed to use API not set by default, which means that the web browser will only allow requests to the web server from the same domain
FACEAPI_CORS_METHODS methods, allowed to invoke the API. Specify comma-separated values as single string (ex. "GET,POST,PUT") all methods
FACEAPI_CORS_HEADERS headers, allowed to read from the API. Specify comma-separated values as a single string (ex. "content-type,date") all headers

This is how the CORS settings section in the default configuration file looks like:

cors: 
origins: "*"
headers: "Content-Type"
methods: "POST,PUT,GET,DELETE,PATCH,HEAD"

You can find detailed information on CORS configuration in our documentation.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Articles in this section