Sorry, new here and not sure if this is the right place to post but I’m going to throw it out here in case anyone can help.
Created a project almost a year ago that uses TensorFlow models. All has been working fine up until this morning. Suddenly our application has started getting errors to fetch models at the following URLs:
tfhub.dev/tensorflow/tfjs-model/blazeface
tfhub.dev/tensorflow/tfjs-model/facemesh
tfhub.dev/tensorflow/tfjs-model/iris
The errors that are being thrown look like CORS errors followed up by a 403. The files our project are attempting to access are all retrievable by a web browser, so I know they didn’t get removed.
I did notice that the urls are being redirected in the browser, so for instance:
This is happening both in a local development environment as well as in a deployed/hosted environment.
Has anyone else experienced this? Can someone shed some light on what might have changed between yesterday and today that would cause us these CORS/403 errors?
Answering my own question in case anyone else comes across this.
We started debugging requests in Postman and found that the models were retrievable in certain conditions. Open an issue with the TensorflowHub team on their GitHub page. Later received response from someone on their team that there was an intermittent issue, asking us to retest. After seeing the message and retesting, all the applications mentioned in the first post were working as expected.
fwiw, my project is not having issues at the moment locally or in testing environments.
One of the ways we were able to troubleshoot more effectively is capturing requests from DevTools in Chrome, copying the request in cURL format, and then moving the cURL requests to Postman. Once we had this in place, we were modifying headers and realized that the file was still available but we were getting access denied errors. I know that isn’t what you’re getting but maybe it could be helpful for your case, so wanted to offer as an idea.
Having cors issues over on Codepen. One day it was fine the next I have error:
Access to fetch at 'https://www.kaggle.com/models/mediapipe/face-landmarks-detection/frameworks/tfJs/variations/attention-mesh/versions/1/model.json?tfjs-format=file&tfhub-redirect=true' (redirected from 'https://tfhub.dev/mediapipe/tfjs-model/face_landmarks_detection/attention_mesh/1/model.json?tfjs-format=file') from origin 'https://cdpn.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.