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

face-api.min.js:1 Fetch API cannot load #34

Open
guyyaffear opened this issue Jul 14, 2020 · 2 comments
Open

face-api.min.js:1 Fetch API cannot load #34

guyyaffear opened this issue Jul 14, 2020 · 2 comments

Comments

@guyyaffear
Copy link

guyyaffear commented Jul 14, 2020

error it is not working i saw in the previous issues that you said to connect it to the sever i i connect it to local server and it is still not working.

face-api.min.js:1 Fetch API cannot load file:///C:/models/tiny_face_detector_model-weights_manifest.json. URL scheme must be "http" or "https" for CORS request.
(anonymous) @ face-api.min.js:1
face-api.min.js:1 Fetch API cannot load file:///C:/models/face_landmark_68_model-weights_manifest.json. URL scheme must be "http" or "https" for CORS request.
(anonymous) @ face-api.min.js:1
face-api.min.js:1 Fetch API cannot load file:///C:/models/face_recognition_model-weights_manifest.json. URL scheme must be "http" or "https" for CORS request.
(anonymous) @ face-api.min.js:1
face-api.min.js:1 Fetch API cannot load file:///C:/models/face_expression_model-weights_manifest.json. URL scheme must be "http" or "https" for CORS request.
(anonymous) @ face-api.min.js:1
face-api.min.js:1 Uncaught (in promise) TypeError: Failed to fetch
at face-api.min.js:1
at face-api.min.js:1
at Object.next (face-api.min.js:1)
at face-api.min.js:1
at new Promise ()
at p (face-api.min.js:1)
at lp (face-api.min.js:1)
at face-api.min.js:1
at face-api.min.js:1
at Object.next (face-api.min.js:1)

thank you for the help!.

@samartinell
Copy link

I think you should run the site through http server (download Node js, then create 2 cmd file in script folder, one with "npm install http-server -g", and the second one with "http-server", run them), but.... I had the same problem and after this "fix" the problems ran away, but script still shows nothing. sorry for poor english, i'm from Russia :)

@samartinell
Copy link

Hey, bro, I'm not sure, but it's maybe can help you too. I fixed the problem with "live server" plugin in visual studio. So, just install it and run the index.html through live server (RMB on file)

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

2 participants