Index.js issues?
Describe the bug
My Gradio app that worked 12 hours ago now seems to have issues when loading. No errors server side.
Is there an existing issue for this?
- [X] I have searched the existing issues
Reproduction
Versions pinned:
pip install fastapi==0.95.2 gradio==3.20.1
app:
from fastapi import FastAPI
from fastapi.responses import RedirectResponse
import gradio as gr
fastapi_app = FastAPI()
gradio_app = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")
@fastapi_app.get("/")
def redirect_to_gradio():
return RedirectResponse(url="/gradio")
app = gr.mount_gradio_app(fastapi_app, gradio_app, path='/gradio')
trigger:
uvicorn basic_app:app --host 0.0.0.0 --port 7777
12 hrs ish ago, everything loaded fine in browser. Now I get:
Screenshot
Logs
python shows no errors just browser
System Info
gradio = 3.20.1
os = Ubuntu 22.04.2 LTS
browser = chrome Version 114.0.5735.110 (Official Build) (64-bit)
Severity
blocking all usage of gradio
Hi @Data-drone can you please check with the latest version of gradio?
With the latest version I get this: https://github.com/gradio-app/gradio/issues/3472
Hi @Data-drone is this still an issue with the latest version of gradio? We've fixed #3472
I am getting this with gradio-3.47.1
Really weird @Data-drone . I can't reproduce locally. Maybe something changed with cloud.databricks.com?
I'll see if I can find out more info. Are you able to point into what I should be looking at? I am not a web dev
Can you also try to pin gradio_client to 0.0.1?
EDIT: Only if you are using version 3.20.1! If you are on 3.47.1 please use 0.6.0.
I investigated some more and pinning gradio_client didn't work
Hi @Data-drone sorry I know this is an old issue, but if you are still facing this problem, can you please check if the latest version of gradio (4.21) still has this issue? We made some fixes to how Gradio works behind proxies which may have solved this issue
Okay will try to find the time
Thanks @Data-drone! I'm going to close this for now since I believe this issue is solved, but can reopen if needed.
Hi @abidlabs I finally managed to try and I am using this app command:
import gradio as gr
CUSTOM_PATH = "/driver-proxy/o/4953176047938121/0327-132800-5tl1wbti/"
io = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")
if __name__ == '__main__':
io.launch(root_path=CUSTOM_PATH)
I have set GRADIO_SERVER_NAME and GRADIO_SERVER_PORT as well.
The app is being started with; !python3 my_app.py
It looks like it is still looking for index.css under the raw server uri rather than adding the root_path to that as well
I just tried with GRADIO_ROOT_PATH set and with the full uri ie http://blahblahblah/CUSTOM_PATH and that seems to work but still getting an errow with assets unlike before the buttons are rendering though
I think that error can be ignored if the page loads correctly. Note to @pngwn and @abidlabs though