-
Notifications
You must be signed in to change notification settings - Fork 734
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
Notifications not clearing after sync #4862
Comments
does this happen for all rooms/chats? I've seen this issue happen in the past when the message read push events are not sent due to push rules, I was able to get them working again by setting the room notifications to none and back to all |
I don't think this is uncommon, multiple customers and IRL friends report it, and I see it as basically my normal experience with the android app. You could be right, that this is caused by push rules not being correctly set, next time I see this on a specific room I will toggle the notification settings for that room and see if it helps. |
ah wasn't aware of more reports, happy to bump it up |
Naturally, now I've just tested this to see if I could try the push-rules question, I couldn't repo at all..! So, I will try to get a better repro and come back with more info. |
if possible that would be great! the push flows are quite tricky as there's so many moving parts (firebase cloud messaging tokens, google play services availability, OEM battery optimisations, cross client push rules config, sygnal and the /sync) |
I've been also having this issue frequently now. Notifications arrive on time, but then most of the times they stay on the phone until I open Element. Once in a while. it works as expected and the notification is cleared automatically, but most of the times it is not. |
This has been an issue for me recently as well - I think it started in January this year (it used to work perfectly before).
|
This happens literally 100% of the time for me across all android devices I own. So I would not say "frequent" I would say "always" for frequency. I'm seriously not exaggerating here too, it actually is 100%. |
I would like to add that this is not isolated to Android; the same behavior folks have been describing here has been happening on iOS for quite a while (a few months?) as well. |
Yeah, this is really annoying. Has anyone found a workaround? |
Yeah this is still happening for all android devices in my Sphere of Influence(tm) |
For those issues with notifications not dismissing when read on another client until opening Element Android, this should be the fix on synapse, which was not doing push as expected: matrix-org/synapse#12721 |
ETA before that hits production public matrix servers? |
The synapse team needs to review the PR first (I'm only a third party contributor) before it'll get included in any release. You can follow the linked PR for updates. |
@SpiritCroc Thank you so much!! I monkey-patched my Synapse installation with the line from your PR and it works beautifully again! |
Great, thanks for testing and reporting! |
On Android (Element) notifications from the matrix.org instance disappear as excepted (again) after a message is read in web Element app. Thanks. |
Persisting notification info fails for non-null Uris: E NotificationEventPersistence: ## Failed to save cached notification info E NotificationEventPersistence: java.io.NotSerializableException: android.net.Uri$HierarchicalUri E NotificationEventPersistence: at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1240) E NotificationEventPersistence: at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1604) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1565) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1488) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1234) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354) E NotificationEventPersistence: at java.util.ArrayList.writeObject(ArrayList.java:762) E NotificationEventPersistence: at java.lang.reflect.Method.invoke(Native Method) E NotificationEventPersistence: at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1036) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1552) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1488) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1234) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354) E NotificationEventPersistence: at org.matrix.android.sdk.internal.session.securestorage.SecretStoringUtils.saveSecureObjectM(SecretStoringUtils.kt:283) E NotificationEventPersistence: at org.matrix.android.sdk.internal.session.securestorage.SecretStoringUtils.securelyStoreObject(SecretStoringUtils.kt:150) E NotificationEventPersistence: at org.matrix.android.sdk.internal.session.securestorage.DefaultSecureStorageService.securelyStoreObject(DefaultSecureStorageService.kt:27) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationEventPersistence.persistEvents(NotificationEventPersistence.kt:58) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationDrawerManager$persistEvents$1.invoke(NotificationDrawerManager.kt:183) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationDrawerManager$persistEvents$1.invoke(NotificationDrawerManager.kt:182) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationState.queuedEvents(NotificationState.kt:55) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationDrawerManager.persistEvents(NotificationDrawerManager.kt:182) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationDrawerManager.refreshNotificationDrawerBg(NotificationDrawerManager.kt:177) Accordingly, if a notification for an image is shown, and the notification state is loaded from storage later, none of the previously shown notifications will get dismissed once read. Likely addresses element-hq#4862. Change-Id: I2d6be497e8b92e770b680e16e42b3610add57323
Persisting notification info fails for non-null Uris: E NotificationEventPersistence: ## Failed to save cached notification info E NotificationEventPersistence: java.io.NotSerializableException: android.net.Uri$HierarchicalUri E NotificationEventPersistence: at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1240) E NotificationEventPersistence: at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1604) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1565) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1488) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1234) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354) E NotificationEventPersistence: at java.util.ArrayList.writeObject(ArrayList.java:762) E NotificationEventPersistence: at java.lang.reflect.Method.invoke(Native Method) E NotificationEventPersistence: at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1036) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1552) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1488) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1234) E NotificationEventPersistence: at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354) E NotificationEventPersistence: at org.matrix.android.sdk.internal.session.securestorage.SecretStoringUtils.saveSecureObjectM(SecretStoringUtils.kt:283) E NotificationEventPersistence: at org.matrix.android.sdk.internal.session.securestorage.SecretStoringUtils.securelyStoreObject(SecretStoringUtils.kt:150) E NotificationEventPersistence: at org.matrix.android.sdk.internal.session.securestorage.DefaultSecureStorageService.securelyStoreObject(DefaultSecureStorageService.kt:27) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationEventPersistence.persistEvents(NotificationEventPersistence.kt:58) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationDrawerManager$persistEvents$1.invoke(NotificationDrawerManager.kt:183) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationDrawerManager$persistEvents$1.invoke(NotificationDrawerManager.kt:182) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationState.queuedEvents(NotificationState.kt:55) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationDrawerManager.persistEvents(NotificationDrawerManager.kt:182) E NotificationEventPersistence: at im.vector.app.features.notifications.NotificationDrawerManager.refreshNotificationDrawerBg(NotificationDrawerManager.kt:177) Accordingly, if a notification for an image is shown, and the notification state is loaded from storage later, none of the previously shown notifications will get dismissed once read. Likely addresses element-hq#4862. Change-Id: I2d6be497e8b92e770b680e16e42b3610add57323
I'm seeing notifications from keywords not clearing with Element-Android 1.4.27 and Synapse v1.60.0. Notifications for things like private messages are being cleared. The notification stays even in I open Element-Android, and only goes away when I open the room that the notification was generated in. Is it possible that there's a similar bug with sending pushes for clearing keyword notifications? |
So this "fix" has hit production, and initially it improved things, but now Element Android does not seem to be lazy-loading when a device is idle/low power, and again notifications are not being cleared until a device starts getting used again... It seems one solution leads to another problem :O |
Still seeing this in Element-Android 1.6.12. |
Frankly notifications for Element Android have become so extremely unreasonably unreliable, I've just switched to schildichat and I'll probably dump Element Android soon. As I'm testing both at the same time, schildichat so far is worlds more reliable for receiving, sending, clearing, and other notification stuff that I can't remember this moment. |
That's surprising, as SchildiChat is an Element fork, so I'd expect it to inherit Element's bugs. https://github.com/SchildiChat/SchildiChat-android/blob/sc/FEATURES.md lists two small notification-related features, but nothing about reliability. Are you perhaps using SchildiChat Next (which is very different)? |
I also have the same experience as @BloodyIron . On multiple occasions I've switched to SchildiChat (not Next) because of notification issues. |
As far as I remember I have upstreamed all notification reliability fixes I did for SchildiChat, so don't know why it would differ from Element right now |
Well proof's in the pudding, it's been head and shoulders more reliable for me and multiple other people around me than the Element Android app. Software can regress by the way, which is the case with Element frankly. Like there have been sooooooo many notification regressions, bugs, and problems over the years with Element alone. I previously chalked it up to "cutting their teeth" growing pain stuff, but at this point, it's just straight up unacceptably unreliable. From a motivations perspective it's extremely surprising that notification reliability is not one of the top priorities a chat app cares about. Also, I am not rocking SchildiChat Next. This is what I'm rocking : https://play.google.com/store/apps/details?id=de.spiritcroc.riotx&hl=en_CA&gl=US |
Your efforts are appreciated, thanks! |
I can confirm that SchildiChat does not have the stuck notifications problem! After I clear the notifications on my PC, they disappear from SchildiChat after a minute or so.
Interesting - I'm wondering if this could somehow be related to a difference in the push mechanism. Could it be something like Element and Element X using GCM (and Synapse having bugs with it), but SchildiChat using polling (which is less efficient but also not having push bugs)? |
Steps to reproduce
Outcome
What did you expect?
Read messages are cleared from notifications
What happened instead?
They remain.
Your phone model
Samsung S20FE
Operating system version
Android 11
Application version and app store
1.3.12
Homeserver
No response
Will you send logs?
No
The text was updated successfully, but these errors were encountered: