element-android icon indicating copy to clipboard operation
element-android copied to clipboard

Notifications not clearing after sync

Open benparsons opened this issue 3 years ago • 30 comments

Steps to reproduce

  1. I get messages
  2. Android shows me a notification
  3. I read the messages on element-web
  4. I get more messages
  5. Android updates the notification to show me, but those messages I already read are still shown in the notification

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

benparsons avatar Jan 05 '22 14:01 benparsons

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

ouchadam avatar Jan 05 '22 15:01 ouchadam

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.

benparsons avatar Jan 06 '22 11:01 benparsons

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.

ah wasn't aware of more reports, happy to bump it up

ouchadam avatar Jan 06 '22 11:01 ouchadam

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.

benparsons avatar Jan 06 '22 11:01 benparsons

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)

ouchadam avatar Jan 06 '22 11:01 ouchadam

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. I already changed the room notification settings to Off and back to On on the app, but the problem persists.

abmantis avatar Mar 06 '22 20:03 abmantis

This has been an issue for me recently as well - I think it started in January this year (it used to work perfectly before).

  • Pixel 6
  • Element Android Beta
  • hosting my own Synapse; never more than a week behind release of Debian packages

hho avatar Mar 28 '22 23:03 hho

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

BloodyIron avatar Apr 12 '22 16:04 BloodyIron

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?

marius avatar May 11 '22 09:05 marius

Yeah this is still happening for all android devices in my Sphere of Influence(tm)

BloodyIron avatar May 11 '22 15:05 BloodyIron

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: https://github.com/matrix-org/synapse/pull/12721 This does however not address the original issue above. In particular, if at "4. I get more messages" notifications aren't dismissed, there's something else broken as far as I see.

SpiritCroc avatar May 12 '22 15:05 SpiritCroc

ETA before that hits production public matrix servers?

BloodyIron avatar May 12 '22 17:05 BloodyIron

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 avatar May 12 '22 17:05 SpiritCroc

@SpiritCroc Thank you so much!! I monkey-patched my Synapse installation with the line from your PR and it works beautifully again!

hho avatar May 13 '22 09:05 hho

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

SpiritCroc avatar May 13 '22 09:05 SpiritCroc

On Android (Element) notifications from the matrix.org instance disappear as excepted (again) after a message is read in web Element app. Thanks.

wodny avatar May 27 '22 15:05 wodny

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?

CyberShadow avatar Jul 21 '22 12:07 CyberShadow

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

BloodyIron avatar Jul 26 '22 00:07 BloodyIron

Still seeing this in Element-Android 1.6.12.

CyberShadow avatar Mar 24 '24 13:03 CyberShadow

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.

BloodyIron avatar Mar 27 '24 15:03 BloodyIron

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)?

CyberShadow avatar Mar 27 '24 15:03 CyberShadow

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.

abmantis avatar Mar 27 '24 16:03 abmantis

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

SpiritCroc avatar Mar 27 '24 16:03 SpiritCroc

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)?

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

BloodyIron avatar Mar 27 '24 16:03 BloodyIron

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

Your efforts are appreciated, thanks!

BloodyIron avatar Mar 27 '24 16:03 BloodyIron

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.

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.

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

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)?

CyberShadow avatar Apr 21 '24 13:04 CyberShadow