Skip to content
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

Chats no longer refresh since recent update, requires "backing out" or force close to refresh #7876

Open
binarydad opened this issue Jan 2, 2023 · 48 comments
Labels
A-Sync O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@binarydad
Copy link

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!

@bmarty
Copy link
Member

bmarty commented Jan 2, 2023

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?

@q234rty
Copy link

q234rty commented Jan 3, 2023

This happened to me as well, starting from 1.5.14 (1.5.13 worked fine).

@q234rty
Copy link

q234rty commented Jan 3, 2023

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.

@ryanpeters-MSFT
Copy link

ryanpeters-MSFT commented Jan 3, 2023

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

@binarydad
Copy link
Author

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!

@q234rty
Copy link

q234rty commented Jan 6, 2023

In my experience this only happens if you leave the app in the background long enough and then go back to the app.

@binarydad
Copy link
Author

Understood. Either way, it's a new (only slightly annoying) behavior.

@binarydad
Copy link
Author

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?

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.

@binarydad
Copy link
Author

Would the PR (#7724) possibly address this issue?

@binarydad
Copy link
Author

Sorry for being noisy. Still having the same behavior.

@joshuaboniface
Copy link

joshuaboniface commented Jan 16, 2023

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.

@bmarty bmarty added A-Sync S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely T-Defect Something isn't working: bugs, crashes, hangs and other reported problems labels Jan 16, 2023
@binarydad
Copy link
Author

binarydad commented Jan 23, 2023

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.

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.

@opusforlife2
Copy link
Contributor

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.

@binarydad
Copy link
Author

binarydad commented Jan 27, 2023 via email

@Tycho-S
Copy link

Tycho-S commented Feb 9, 2023

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.

@z411
Copy link

z411 commented Feb 10, 2023

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.

@Tycho-S
Copy link

Tycho-S commented Feb 10, 2023

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 ( #7827 ) is causing this. It seems to be causing an edge case that stops the sync thread from continuing after a while.

@binarydad
Copy link
Author

I've noticed this might be fixed in 1.5.24. Maybe with this commit? #8019

@z411
Copy link

z411 commented Feb 10, 2023

I just hit the bug again on 1.5.22 - I'll try 1.5.24 now.

@joshuaboniface
Copy link

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.

@binarydad
Copy link
Author

binarydad commented Feb 12, 2023 via email

@Tycho-S
Copy link

Tycho-S commented Feb 12, 2023

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.

@opusforlife2
Copy link
Contributor

Nah, before the problematic version, Element used to run just fine for days on end without bugging out this way.

@Tycho-S
Copy link

Tycho-S commented Feb 12, 2023

@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.

@cpot
Copy link

cpot commented Feb 12, 2023

Same problem here 1.5.22, no E2E, homeserver, Android 13 (Galaxy S20)
Terrible bug let's face it

@z411
Copy link

z411 commented Feb 16, 2023

It hasn't happened to me since I updated to 1.5.24 but it might be coincidence.

@opusforlife2
Copy link
Contributor

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".

@BloodyIron
Copy link

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.

@opusforlife2
Copy link
Contributor

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.

@Tycho-S
Copy link

Tycho-S commented Mar 12, 2023

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 #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.

@Tycho-S Tycho-S mentioned this issue Mar 12, 2023
@BloodyIron
Copy link

This issue persists for my SO. No VPN involved.

@timokoesters
Copy link
Contributor

At least on my device, it's fixed on Element 1.5.26. It was broken on 1.5.22. I haven't checked which particular version fixed it.

@Sir-Photch
Copy link

Sir-Photch commented May 10, 2023

Still happening to me. I get:

Sync thread: Running(afterPause=true)
Sync request: Parsing 11 room(s) 0 toDevice(s)

And force-closing the app doesn't fix this.
I am on 1.5.32 with ntfy using dendrite on 0.12.0.

Interestingly, messages I send are received, but I don't get the replies.

EDIT: okay yeah, after a couple of times of backing out, it resyncs fine.

@maxamillion
Copy link

maxamillion commented Aug 30, 2023

Still happening here on 1.6.5 on Galaxy S23.

@opusforlife2
Copy link
Contributor

I think this is new in 1.6.5. It wasn't occurring on 1.6.3.

@Tycho-S
Copy link

Tycho-S commented Sep 4, 2023

Still happening for me too. I am back on 1.5.13 which is the last version that actually worked.

@MattyBoombalatty
Copy link

I'm also having this issue. Android 13, Element version 1.6.5. Desktop client works fine. Might revert to an older version until this is fixed. It's pretty terrible.

@Tycho-S
Copy link

Tycho-S commented Oct 4, 2023

I don't think it'll ever be fixed. I'm pretty sure it was introduced by this hotfix: #7827 (because nothing else was changed in the 1.5.14 which was the first version with the issue) and I tried to link to that but it's not getting any attention.

But the good thing is that Element X is coming and it'll be a complete rewrite. It's not full-functional enough for me to use yet but hopefully it will be soon.

@MattyBoombalatty
Copy link

I don't think Element X will be up to speed for awhile. I'll check that version instead. Thank you.

@MattyBoombalatty
Copy link

I'm not able to find the v1.5.13 APK. Is it somewhere in the releases?

@Tycho-S
Copy link

Tycho-S commented Oct 4, 2023

Yes here: https://github.com/vector-im/element-android/releases/tag/v1.5.13

@MattyBoombalatty
Copy link

Thank you. I'm on 1.5.32 from F-Droid right now and it seems to be working alright thus far but I'll download this one just for the future. I appreciate your help.

@MattyBoombalatty
Copy link

Had to revert to v1. 5.13 as 1.6.6 still has this problem. Oh well. Hopefully the Element X team will be able to crank out features for the new interface.

@animegrafmays
Copy link

they wont, element x is cringe and barely usable for basic conversation

@animegrafmays
Copy link

b-buh muh features
there are none. sliding sync is a waste and element x is not going anywhere. you literally cant use it a year later

@animegrafmays
Copy link

"please sir install this secondary application to make my server work faster and your users will have their content much faster"
"but can they tag people"
"conversation????????????????????????????????????????????????????????"

@BloodyIron
Copy link

@animegrafmays please stay on topic. And we really don't need 3x comments that don't actually contribute to the original topic. This isn't an effective (or appropriate) place for comments of that nature. Best to post them in a place that will actually be relevant for them ;P (namely, not this thread)

@austinbutler
Copy link

austinbutler commented Jun 1, 2024

Still happens on the current Play Store version, 1.6.14. My usage is about as vanilla as one could expect, Element, Matrix.org homeserver, Google Play services on a stock Pixel phone. Push notifications seem pretty reliable. Actually accessing the messages that clearly exist on the server is another story entirely. I'll click the push notification then be taken to the conversation, then I wait. And wait. And wait. The loading bar at the top scrolls forever but nothing happens. Sometimes backing out of the conversation helped. Sometimes I had to force stop.

Eventually nothing worked so I tried Element X again. At first it seemed like they'd fixed it there, but then it happened to me today on X, I had to force stop to get new messages I saw via push notification. My current setup is having both Element Android and Element X installed with Element Android notifications turned off and X notifications turned on. I'm now considering installing a third client like FluffyChat to see if anything can reliably do something as simple as retrieve the latest messages 🤕.

Desktop is generally reliable these days so doesn't seem to be a server issue.

#4669 looks very similar, even provides a video that looks similar to what I'm seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Sync O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

No branches or pull requests