Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load resource with live server on #22

Open
Lorraine99 opened this issue Feb 11, 2020 · 3 comments
Open

Failed to load resource with live server on #22

Lorraine99 opened this issue Feb 11, 2020 · 3 comments

Comments

@Lorraine99
Copy link

Hi!
I got error like this:
Failed to load resource: the server responded with a status of 404 (Not Found)
face-api.min.js:1 Uncaught (in promise) Error: failed to fetch: (404) Not Found, from url: http://127.0.0.1:5501/models/tiny_face_detector_model-weights_manifest.json
at face-api.min.js:1
at face-api.min.js:1
at Object.next (face-api.min.js:1)
at n (face-api.min.js:1)
:5501/models/face_landmark_68_model-weights_manifest.json:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:5501/models/face_recognition_model-weights_manifest.json:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:5501/models/face_expression_model-weights_manifest.json:1 Failed to load resource: the server responded with a status of 404 (Not Found)

I clone the repository without changing anything, not sure what's wrong.

@jcrommar
Copy link

@Lorraine99 it looks like the issue is related to the models. I'd try to create the project from scratch rather than copying cloning. Things usually work out better for me that way and I was able to fire this up in 10 mins.

@Fantantonio
Copy link

It seems to be related to this:

In response to CVE-2019-11730, Firefox 68 and later define the origin of a page opened using a file:/// URI as unique. Therefore, other resources in the same directory or its subdirectories no longer satisfy the CORS same-origin rule. This new behavior is enabled by default using the privacy.file_unique_origin preference.

ref -> https://developer.mozilla.org/it/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp

for each weight file inside "models" folder called from face-api.js through script.js

@Fantantonio
Copy link

I think @Lorraine99 you are not using a web server.
Try to put all the files inside the localhost and access them by http://localhost/path/of/file.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants