gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Multi-tasking on mobile (iOS/Android) seems to silently remove user from the queue

Open apolinario opened this issue 1 year ago • 6 comments

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

image

Logs

No logs

System Info

Stable Diffusion Spaces demo running on Galaxy Fold 3

Severity

serious, but I can work around it

apolinario avatar Aug 24 '22 09:08 apolinario

Now that we show an error if the connection is disconnected, we can close this issue, right @aliabid94 @apolinario?

abidlabs avatar Sep 08 '22 20:09 abidlabs

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)

apolinario avatar Sep 09 '22 10:09 apolinario

Makes sense. I believe @aliabid94 looked into it, WDYT of the feasibility of this @aliabid94?

abidlabs avatar Sep 09 '22 14:09 abidlabs

Yes it's possible and definitely needs to be done. Will require restructuring our queue system a bit. Will work on this very soon.

aliabid94 avatar Sep 09 '22 19:09 aliabid94

Just to report that the same happens on iPhone (I changed my devices), so I updated the issue accordingly

apolinario avatar Feb 03 '23 11:02 apolinario

That makes it easier to test, thanks @apolinario!

abidlabs avatar Feb 04 '23 00:02 abidlabs