Search code examples
tensorflow-hub

Why is Tensorflow Hub giving 403 Error suddenly?


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:

The network tab shows a 403 response to the above addresses and the console log is filled with CORS errors and the corresponding 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:

gets redirected to

I'm not sure if this redirection is new behavior or not because, as mentioned above, this was all working without issue yesterday.

The errors are happening both in a local development environment as well as in a deployed/hosted environment. Also a different project that I know uses TensorFlow and hosts an example has the same error. This isn't my project but you can go to Webgazer.js collision demo and inspect the page to see the exact same issue we're experiencing.

Also worth mentioning that our project doesn't download the models directly, it uses libraries to do so.

"@tensorflow-models/face-landmarks-detection": "0.0.3"
"@tensorflow/tfjs": "^3.15.0"

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?

Thanks,

Pat


Solution

  • After posting this question here, did some more triaging and found that the requests from the site would work in Postman when changing the security headers. So posted a GitHub issue with the TensorFlow Hub team. They reported intermittent issues and asked me to retest. The issues were resolved and site was working as expected after that.