Skip to content

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

Description

@guyyaffear

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!.

Activity

  1. samartinell commented on Sep 15, 2020

    @samartinell

    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 :)

  2. samartinell commented on Sep 15, 2020

    @samartinell

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions