element-android
element-android copied to clipboard
Chats no longer refresh since recent update, requires "backing out" or force close to refresh
Since around 1.5.12 I believe (at least 1.5.14), I've noticed that when I open the app, the chats no longer refresh, and I'm seeing old messages from the last time I used the app. I have to "back out", force close, or clear the cache (in Settings) for it to work again. Only then does the "rolling" green loading indicator cycle along the top of the chats and they begin refreshing. Still, even after this, when I open the app again later on, it has not refreshed since that time. I'm currently using 1.5.18 and the issue is still there.
I am not seeing this on the desktop/web clients.
I'm using Synapse 1.74 on Ubuntu. The device is Android 13 on a Galaxy S22. Thanks!
Hi, thanks for the feedback @binarydad .
It looks like your app is not syncing when in background (and even when in foreground, which is more concerning).
At first check, can you navigate to Settings/Notifications/Troubleshoot Notification and see what's happening there?
This happened to me as well, starting from 1.5.14 (1.5.13 worked fine).
I believe the sync related change in 1.5.14 caused the app to not try to sync at all in certain cases, but not sure.
My check of the notifications was fine. I did notice, however, that after clearing cache again, it seems to be "keeping up" with the state when comparing it to the desktop app. I'll monitor it and report back if it starts falling behind in terms of chat state/messages.
EDIT: oops, posted from my other GH account. ryanpeters-MSFT = binarydad
Update since last time... it seems oddly intermittent. About 80% of the time, going back into the app, I immediately see the green bar sliding/loading across the top, and chats refresh. However, I just now went back into the app and it still had chat state from very early this morning (backing out of the app and re-opening caused them to refresh).
Still, this was almost never a problem before some of the recent updates (not sure which one).
How can I assist with this further? Thanks!
In my experience this only happens if you leave the app in the background long enough and then go back to the app.
Understood. Either way, it's a new (only slightly annoying) behavior.
Hi, thanks for the feedback @binarydad . It looks like your app is not syncing when in background (and even when in foreground, which is more concerning). At first check, can you navigate to
Settings/Notifications/Troubleshoot Notificationand see what's happening there?
FYI, still happening - I'll open the app and I only see messages from the day before, until I back out of the app. Is there anything else I can try or give additional information? Thanks.
Would the PR (https://github.com/vector-im/element-android/pull/7724) possibly address this issue?
Sorry for being noisy. Still having the same behavior.
Another confirmation of this behaviour., though slightly different. In my case, it also affects incoming push notifications. Those do not come in at all until I open the app and it refreshes. But the app does refresh itself once opened within a few seconds.
Troubleshooting notifications hangs during the "Test Push" stage. Confirming on my homeserver that nothing comes in beyond the earlier test that hits the pushers endpoint.
Jan 16 10:01:35 synapse matrix-synapse[3320551]: 2023-01-16 10:01:35,525 - synapse.access.http.8008 - 460 - INFO - GET-8 - ::ffff:x.x.x.x - 8008 - {@joshuaboniface:bonifacelabs.ca} Processed request: 0.023sec/0.001sec (0.005sec, 0.002sec) (0.002sec/0.016sec/3) 344B 200 "GET /_matrix/client/r0/pushers HTTP/1.1" "Element/1.5.20 (samsung SM-G970W; Android 12; SP1A.210812.016.G970WVLS8IVK2; Flavour GooglePlay; MatrixAndroidSdk2 1.5.20)" [0 dbevts]
This was tested with push integrated into the main process as a test; I switched back to the dedicated pusher worker, and then if I have someone send a real push, my pusher worker just shows:
Jan 16 10:15:22 synapse matrix-synapse-pusher[3324368]: 2023-01-16 10:15:22,122 - synapse.push.httppusher - 225 - INFO - httppush.process-18 - Processing 1 unprocessed push actions for @joshuaboniface:bonifacelabs.ca/im.vector.app.android/xxx:xxx-xxx starting at stream_ordering 10084081
Jan 16 10:15:22 synapse matrix-synapse-pusher[3324368]: 2023-01-16 10:15:22,387 - synapse.http.client - 460 - INFO - httppush.process-18 - Received response to POST https://matrix.org/_matrix/push/v1/notify: 200
I can't tell for certain if this is something wrong with the homeserver, or something wrong with the mobile client, but it's quite annoying in either case.
Worth noting that this affects myself on Android, but does not seem to affect other users on iOS, nor users on the desktop clients.
Another confirmation of this behaviour., though slightly different. In my case, it also affects incoming push notifications. Those do not come in at all until I open the app and it refreshes. But the app does refresh itself once opened within a few seconds.
Troubleshooting notifications hangs during the "Test Push" stage. Confirming on my homeserver that nothing comes in beyond the earlier test that hits the pushers endpoint.
Jan 16 10:01:35 synapse matrix-synapse[3320551]: 2023-01-16 10:01:35,525 - synapse.access.http.8008 - 460 - INFO - GET-8 - ::ffff:x.x.x.x - 8008 - {@joshuaboniface:bonifacelabs.ca} Processed request: 0.023sec/0.001sec (0.005sec, 0.002sec) (0.002sec/0.016sec/3) 344B 200 "GET /_matrix/client/r0/pushers HTTP/1.1" "Element/1.5.20 (samsung SM-G970W; Android 12; SP1A.210812.016.G970WVLS8IVK2; Flavour GooglePlay; MatrixAndroidSdk2 1.5.20)" [0 dbevts]This was tested with push integrated into the main process as a test; I switched back to the dedicated pusher worker, and then if I have someone send a real push, my pusher worker just shows:
Jan 16 10:15:22 synapse matrix-synapse-pusher[3324368]: 2023-01-16 10:15:22,122 - synapse.push.httppusher - 225 - INFO - httppush.process-18 - Processing 1 unprocessed push actions for @joshuaboniface:bonifacelabs.ca/im.vector.app.android/xxx:xxx-xxx starting at stream_ordering 10084081 Jan 16 10:15:22 synapse matrix-synapse-pusher[3324368]: 2023-01-16 10:15:22,387 - synapse.http.client - 460 - INFO - httppush.process-18 - Received response to POST https://matrix.org/_matrix/push/v1/notify: 200I can't tell for certain if this is something wrong with the homeserver, or something wrong with the mobile client, but it's quite annoying in either case.
Worth noting that this affects myself on Android, but does not seem to affect other users on iOS, nor users on the desktop clients.
Same here as well. After noticing it didn't refresh, I tested sending a message to myself from my son's phone to see if I was at least receiving notifications in some fashion, but they did not come (they were received fine on web/desktop). And as @joshuaboniface mentioned, after backing out and letting the app refresh, it all works again. It's something being idle after a while when it seems to emit the behavior.
BTW I'm using NTFY, but don't believe the overall behavior is related to the push handler.
I was waiting to get 1.5.20 on F-Droid before commenting. If you remove the app from Recents, then sync works fine. But if you merely Back out of Element to the home screen or another app, then upon resuming the app the Sync thread state changes to Idle... permanently. The only way to fix it is to remove the app from Recents again. Waiting for it to resolve itself never works.
Sometimes, quickly opening a chat upon resuming causes the sync state to become normal again, but not always.
I'm running 1.5.22 and it is not yet fixed.
------ Original Message ------ From "opusforlife2" @.> To "vector-im/element-android" @.> Cc "Ryan Peters" @.>; "Mention" @.> Date 1/27/2023 4:14:24 PM Subject Re: [vector-im/element-android] Chats no longer refresh since recent update, requires "backing out" or force close to refresh (Issue #7876)
I was waiting to get 1.5.20 on F-Droid before commenting. If you remove the app from Recents, then sync works fine. But if you merely Back out of Element to the home screen or another app, then upon resuming the app the Sync thread state changes to Idle... permanently. The only way to fix it is to remove the app from Recents again. Waiting for it to resolve itself never works.
Sometimes, quickly opening a chat upon resuming causes the sync state to become normal again, but not always.
— Reply to this email directly, view it on GitHub https://github.com/vector-im/element-android/issues/7876#issuecomment-1407080982, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANN2X6T2CSP4ZZSQ35CFG3WUQ3DBANCNFSM6AAAAAATPCN3HQ. You are receiving this because you were mentioned.Message ID: @.***>
I'm still having this too. It's very annoying because even though notifications come in, the history shown in Element is stale. The sync thread just stays on idle. I have to force kill the app to make it work again but it will go back to idle after a while and then it remains dead. I was using the normal Google firebase cloud messaging by the way, not ntfy.. I have Google play installed but am not logged into it. This is not normally a problem for push.
I've found a workaround: using the F-droid version of element which doesn't use push. That keeps the sync thread alive somehow. But it absolutely kills my battery life because it constantly has to sync in the background. I see in this thread that others have discovered this workaround as well.
This is on Android 13 by the way. If you need any info or logs please let me know.
Edit: Sorry for the double comment. Thought I was editing.
Same here, SyncThread changes to idle. Also I don't always get timely notifications or voice calls, although that might be because of MIUI (another friend with MIUI can confirm as well). It's not reliable for 1:1 communications as these sometimes are urgent. I sent some rageshakes with the "Not syncing" description.
I've tried reverting to 1.5.13 and it seems to have resolved the issue. I think there is merit in what @q234rty suggested, that the hotfix in 1.5.14 ( https://github.com/vector-im/element-android/pull/7827 ) is causing this. It seems to be causing an edge case that stops the sync thread from continuing after a while.
I've noticed this might be fixed in 1.5.24. Maybe with this commit? https://github.com/vector-im/element-android/pull/8019
I just hit the bug again on 1.5.22 - I'll try 1.5.24 now.
Still having this issue on 1.5.24 as well. For fun I decided to also change the power management setting on the app (just in case it was Android backgrounding it) to Unrestricted, and this makes no difference either.
Interesting. I have yet to see it and I think I would have by now.
I think it's not showing the bug for some people because some phones kill the app in the background a lot. For me it often takes a day or two to manifest. If the app never runs that long it might not happen.
Nah, before the problematic version, Element used to run just fine for days on end without bugging out this way.
@opusforlife2 I meant that this is perhaps why it might not manifest itself for some people like @binarydad . I'm also seeing the problem myself and I agree with you that it never happened before 1.5.14. I reverted to 1.5.13 and it also hasn't happened anymore.
Same problem here 1.5.22, no E2E, homeserver, Android 13 (Galaxy S20) Terrible bug let's face it
It hasn't happened to me since I updated to 1.5.24 but it might be coincidence.
Tentatively considering it fixed as of 1.5.25. I was able to get "Idle" for the Sync thread by backing out and resuming the app, but only once in many tries.
Some new behaviour has come up, though. Immediately backing out and resuming the app now frequently changes the "Sync request" status to "Unknown". Never seen that before. This then sometimes automatically resolves itself and goes back to "Idle". But sometimes it doesn't, and stays as Unknown. The messages still come through though, and then it changes back to "Idle".
Yeah my SO is having very frequent problems every few days of just not receiving my messages, until they force stop and relaunch the app. As soon as they do, they get my messages. This really is a new bug, but it is unclear when it started.
Update: after several weeks, and using 1.5.26 as well, I'm still getting an "Idle" Sync thread once or twice a day. It's low enough not to be a bother, but it means that the underlying problem hasn't been fully fixed.
It's still broken for me too. Still happens a lot in fact. Perhaps it has to do with the fact that my instance isn't publicly reachable. I connect via VPN. I guess this has to do with why this bug manifests itself more often for me.
1.5.13 is working perfectly though. So I've stayed on that. I'm pretty sure the hotfix https://github.com/vector-im/element-android/pull/7827 caused an edge case because it's the only thing that changed in 1.5.14. And it was explicitly to do with the sync thread.
I've stopped testing new versions regularly now. Because I don't think anyone is looking at this issue. But I'm very happy to test it if I can help.
For me it's very bothersome because it causes me to miss urgent messages. The notification still comes in when push is enabled but I don't see them in the app then. So when someone replies while I'm in the app I don't see it.