gradio
gradio copied to clipboard
Multi-tasking on mobile (iOS/Android) seems to silently remove user from the queue
Describe the bug
If I am running a Gradio demo on Android (Galaxy Fold 3) and I do multi-tasking (leave the browser app and go to another app), when I go back to the browser the processing counter is still counting - however the queue never moves, which makes me think that I got de-registered from the queue but was not informed.
--
At least I think it should be shown to user they got de-registered (the execution was stopped) - though In an the ideal world a multi-tasking phone user would not get de-registered (I think?) - but I don't know if there's anything to differentiate a user that closed the tab - which we want to dequeue, from a user that is multi-tasking and may have the tab suspended
Is there an existing issue for this?
- [X] I have searched the existing issues
Reproduction
Run it on your Android phone
Screenshot
Logs
No logs
System Info
Stable Diffusion Spaces demo running on Galaxy Fold 3
Severity
serious, but I can work around it
Now that we show an error if the connection is disconnected, we can close this issue, right @aliabid94 @apolinario?
Imo ideally we would try to find ways to not disconnect the user in case they are multi-tasking on mobile. I wonder if the Page Visibility API or a "reconnect if they are back after x amount of time and place them back in the queue" would be avenues worth exploring. Some more context for it (internal)
Makes sense. I believe @aliabid94 looked into it, WDYT of the feasibility of this @aliabid94?
Yes it's possible and definitely needs to be done. Will require restructuring our queue system a bit. Will work on this very soon.
Just to report that the same happens on iPhone (I changed my devices), so I updated the issue accordingly
That makes it easier to test, thanks @apolinario!