gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
29.49k stars 2.19k forks source link

Gradio website loading error #8196

Closed SkylineYang closed 1 week ago

SkylineYang commented 2 weeks ago

Describe the bug

Currently I designed a front-end page using Gradio on Linux server, and I want to launch it so that I can visit my website on my own PC, sometimes Gradio can work normally and show me the website, but for the rest of the time it breaks down with error like "Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH" when loading css and js files.

Most of the solutions posted on web show that this is because the misfunction of Nginx on Linux server, but I tried many times and finally cannot solve my problem. Did any people meet this kind of problem and successfully solve this?

Have you searched existing issues? 🔎

Reproduction

any gradio python files with gr.Interface().launch()

Screenshot

image

Logs

No response

System Info

gradio                    4.24.0
gradio_client             0.14.0

Severity

I can work around it

abidlabs commented 2 weeks ago

Hi @SkylineYang can you provide your nginx configuration and the code for the gradio app you are running?

SkylineYang commented 2 weeks ago

@abidlabs Which nginx configuration do you need to refer to? There seems to be many files related to nginx and I was confused

abidlabs commented 2 weeks ago

Hi @SkylineYang from searching around, I'm pretty sure this is actually not a Gradio-specific issue, you should check your server logs, as described here: https://stackoverflow.com/questions/22183859/javascript-err-content-length-mismatch

SkylineYang commented 2 weeks ago

Thank you for giving me a direction to solve my problem, I also checked my server's settings and found that this may be caused by other reasons instead of Gradio.

abidlabs commented 1 week ago

Great thanks for letting us know @SkylineYang. I'll go ahead and close this then.