gradio: Random connection errors in gradio 4
Describe the bug
Getting random connection errors in gradio 4 not seen in gradio 3
https://github.com/h2oai/h2ogpt/issues/1439
Have you searched existing issues? š
- I have searched and found no existing issues
Reproduction
No repro yet, happens randomly. I shared dev console after hit.
Screenshot
Nothing at all appears in the logs. Seems like pure UI issue.
Logs
No response
System Info
gradio 4.19 but seen for all gradio 4
Severity
Blocking usage of gradio
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Reactions: 2
- Comments: 25 (10 by maintainers)
oh thank god, haha alright Iāll clean up the PR!
Iāve tried to see if there is some pattern, but I canāt find it. I shared the dev console. I think the gradio UI needs to show more information about what happened and why. āConnection errorā raised is too generic. I canāt tell from dev console where in UI code it happened, I just end up in a place where the error is printed.
I can reproduce it on my own computer (localhost, without using the network) by adding more elements:
The error happens almost every time I refresh the page with this updated script.
@abidlabs behold, I have obtained a reproduction after a lot of trial and error. Here it is:
To reproduce:
python gradio-error.py
This is the error:
I hope that helps identify what is going on so that I can finally update to Gradio 4 š
@aliabid94 it seems to fix the issue for me š
I have launched text-generation-webui some 50 times, and have also used the UI for a bit, and didnāt see any of the error popups, whereas they happened very consistently before. No errors in the terminal as well.
My simple reproduction code above also doesnāt generate errors anymore.
Well done!
Can you guys try the package from https://github.com/gradio-app/gradio/pull/7683 and see if it fixes your issues? To install:
Thanks @oobabooga ! I can repro on one machine with a share link so Iāll use that to look into this. Much appreciated!! š