New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Realtime updates stop after first load of Frontends #259
Comments
This has been discussed with a few people but we've been unable to reproduce it. If anyone can reproduce it, there's a much better change of being able to fix it. Closing for now. |
Sorry to necro this issue, but I've recently been able to pretty consistently recreate it on an iPad and Safari.
I've been able to get it to desync within one or two tries - there seems to be an un-sweet spot where if you open it again too quickly, it's still connected, and if you wait too long, the tab refreshes. For some context on our use case:
Actions (e.g through buttons) still send, just kind of running blind though. |
I also can't reproduce the behaviour, but I have a possible fix if you would like to give it a try. This needs to be added just below the socket.onclose event handler within the updateLogs function in
|
We notice the same behaviour, if an iPad is left showing just a dashboard via safari, it'll be ok for months, but the iPads that we open/close browsers to open other dashboards, will suffer this glitch of not updating status/events. Will try to try your solution @mcartmel . |
Unfortunately @mcartmel's solution didn't work for me, but I found an easier way to reproduce the issue: Looking at the console through safari on mac, I can see that the iPad is still successfully making requests to hasRestarted, but still isn't updating the frontend. |
Can you please test again with this code? I added a line to output the socket state on focus to the console for debugging.
If you do not see |
heya, sorry this took so long, was on a mac version where console.log was broken in safari lol. |
I have an older iPad here which is working fine and refreshes when you go back to the tab. I think it's dependant on the version of iPad and Safari. Can you please let me know which versions you've been able to replicate this on? |
Proactively disconnect and reconnect websockets when visibility and/or connectivity changes
This bug is fixed in iOS 17!Had another look at this with some newer gen iPads; Doing another round of googling; I've found this webkit bug report: https://bugs.webkit.org/show_bug.cgi?id=228296
Which explains why this was so elusive to reproduce. |
e.g. a Dashboard will load in Safari but then not necessarily update. This may happen in Chrome too.
The text was updated successfully, but these errors were encountered: