AxiosError: Request failed with status code 403

Strangely, when I changed the port and the address, it worked.

streamlit run app.py --server.port 5000 --server.address 0.0.0.0

I am facing the same issue and downgrading or upgrading the version is not helping to solve the issue. kindly, suggest any other solution if present.

facing the same issue.

Thank you so much, it saved me tons of debugging

Would this setting cause any potential security risk?

Is there a fix for this problem? Running pythong 3.10.9 and streamlit 1.39.0 and receiving this error.

Still looking for a fix for the AxiosError: Request failed with status code 403 - please respond if you found a (secure) solution for an enterprise application hosted on Azure web apps, using Docker containers.

See here for some solution I found: File upload fails with Error: Request failed with status code 403 - #86 by al-yakubovich

We host Streamlit apps on AWS. And we faced the exact same issue while uploading files. On closer inspection, we found out that one of our AWS WAF rules was blocking files greater than 8kB in size. It was “SizeRestrictions_BODY” rule under “AWSManagedRulesCommonRuleSet”.

We manually created another rule which allowed file uploads from url path starting with “/_stcore/upload_file”. This solved the issue.

I would normally suggest to look for places where file upload size restriction might have been placed. For example, any WAF, load balancers, API gateways, etc. But as you are hosting it on replit.com, I am not sure if you would be allowed to upload files to it. The servers are owned by them and they have full control on what size of file they would let user to upload.

I have the same issue with app deployed on Azure with config.toml having:

[server]
enableStaticServing = true
enableXsrfProtection = false
enableCORS = false

There is no file size limits on Azure. This issue may appear randomly for the same file. I have noticed it appears more frequently for users from UK (app is hosted in EU)

Hi. Do you mean there is no error if you disable Authentication? Which authentication do you use, streamlit_authenticator?