-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
[Bug]: Stream timeline doesn't refresh after the sleep of the computer #136
Comments
confirmed. also made me wonder why there is no "refresh" button! |
Possibly related: #204 |
@jdkruzr there is now refresh button, but you can hit ctrl+r to reload |
where is that refresh button? I don't see it on mobile |
|
awesome! thanks! |
additional question, pull to refresh is nice to have, but is just a workaround to the connection loss after sleeping. I think it should eventually be fixed, but the question is: after pulling to refresh, will the push channel recover? |
Nope it won't. (Well, if it's part of a non-main timeline, you can go back and re-open it and it will re-establish a websocket connection) This issue has some wider problems:
I suppose a middle ground of checking if there's an active websocket connection on refresh (and connecting) is probably a quick temp solution for this |
hum. I had this kind of problem with long lasting websockets. the fix I did was to enable ping control frames. the client sends regular control frames (ping) and has a timeout waiting for a pong. passed that, the connection will be considered as lost. I did that in go, not sure how that translates in vala :) any respectable server implementation should reply to pings |
Your insight would be much appreciated, here's what's going on: Tuba/src/Services/Network/Streams.vala Lines 67 to 80 in 57b480b
when Tuba/src/Services/Network/Streams.vala Lines 110 to 117 in 57b480b
My speculation - without having debugged this issue further - is that the connection closes at some point and while reconnecting, it fails, resulting in never connecting to the Tuba/src/Services/Network/Streams.vala Lines 75 to 77 in 57b480b
Let me know if you notice anything but this definitely needs further debugging |
I think what's happenning is that the client never notices the fact that the connection has been closed on the other side. It should be aware of it, but I've seen many cases where is does not for some reasons, thinking it's connected while it's not. It won't realize until you actually send a message. I suspect in Tuba, we never send anything through the websocket, and the client does not realize nobody's on the other side of the line. I'm unfamilliar with libsoup, but this https://developer-old.gnome.org/libsoup/stable/libsoup-2.4-WebSockets.html#SoupWebsocketConnection--keepalive-interval seems to be related to pings and it defaults to 0, meaning disabled. I'm not sure if setting it to non-zero would actually make it send ping control frame though EDIT: according to that documentation https://libsoup.org/libsoup-3.0/property.WebsocketConnection.keepalive-interval.html it seems to say that this is enough to enable pings, but does not state the default value :) Documentation, you gotta love it :) |
Thanks for the info! The default value seems to be 0 https://gitlab.gnome.org/GNOME/libsoup/-/blob/master/libsoup/websocket/soup-websocket-connection.c#L1625 I set it to 30 seconds 4f54605. I'm a bit hesitant to close this issue however, I'll leave it open for future comments |
Great! I'll give it a try once the flatpak build is done and report back |
it seems to work! if I suspend for less than 30s, I don't see the disconnection warning. if it's more than 30s, i see it and it reconnects |
Awesome, thanks for the solution and testing! If starts happening again, let me know and I'll re-open this issue! |
This still happens with version 0.4.0 from flathub. I closed the lid of my laptop for roughly 25 minutes, during which it was suspended, and then reopened the lid. Tuba did not refresh the home timeline with the posts that happened during the suspended time, whereas there were new posts according to the Mastodon web interface. However, after resuming, future posts get added to Tuba's home timeline automatically. In other words, it is missing the middle, the posts during sleep. Doing a forced refresh with These are the terminal output messages upon resume from suspend:
|
Describe the bug
After sleep of the computer (Fedora 37), the stream timeline (home) doesn't get refreshed. As if the connection is lost.
Steps To Reproduce
3.wake the computer (open the lid)
Logs and/or Screenshots
Instance Backend
Mastodon
Operating System
Fedora 37
Package
Flatpak
Troubleshooting information
If I force quit the app through the System monitor in Gnome and open the app again, it works.
Additional Context
No response
The text was updated successfully, but these errors were encountered: