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

Push notifications sometimes disappear immediately

Open johns2s opened this issue 4 years ago • 27 comments

In a 1:1 encrypted chat, I've noticed that often (but not always, maybe 2/3 of the time), notifications disappear shortly after they appear and my phone vibrates. When this happens, the dot signifying new notifications on the element app icon also disappears.

I'm currently using version 1.2.1 on a Pixel 5 running Android 11, but I've noticed this issue for a few months on both this device and a Pixel 3, also running Android 11.

Here's a video

johns2s avatar Sep 09 '21 20:09 johns2s

I can confirm that I have the same issue on non-encrypted chat. Previously I had this issue when element was left running in the background on my Mac desktop, but now I also have the bug with no other running instances. I am running Element version 1.2.0 (no new version available as of today on my phone) on OnePlus 7 Pro with Android 11 (Oxygen OS 11.0.2.1.GM21BA).

saintger avatar Sep 13 '21 20:09 saintger

I've also experienced this in FluffyChat. Upon further investigation it looks like for some reason these messages are sometimes marked as read erroneously, causing the notifications to disappear.

johns2s avatar Sep 20 '21 04:09 johns2s

My wife has this issue on her pixel 2 running android 11. Any time I send her a message I see that she has immediately read it, but she hasn't and the notification disappears.

vlladdrakk avatar Sep 24 '21 14:09 vlladdrakk

It can happen if another client is viewing the room and moves the read receipt, but I guess it is not the case here?

bmarty avatar Oct 04 '21 20:10 bmarty

it would be quite strange for the android app to move the read receipt on receiving the push notification, although the logic does exist on the mark read notification action...

to double check does this mark as read behaviour happen when the android device is off or in airplane mode? this should pinpoint if there's an app problem or a potential client running in the background somewhere else

ouchadam avatar Oct 05 '21 09:10 ouchadam

I've also got this issue. Also from a 1:1 encrypted room.

lindhe avatar Nov 06 '21 08:11 lindhe

I have updated to version 1.3.7 and I don't have the issue anymore. If the issue comes again, I will report it here (and try with the device off !)

saintger avatar Nov 16 '21 21:11 saintger

I have updated to 1.3.7, and now the notification will not disappear after I click it or choose "mark as read" at all! 😅 I have to manually dismiss it by swiping it to the side.

lindhe avatar Nov 17 '21 07:11 lindhe

@lindhe that's unexpected :thinking: would you be able to create a new issue? Would be great to have some details about your device/OS

There were some changes needed for the upgrade to android 12 specifically around notification clicks https://github.com/vector-im/element-android/pull/4433 If you're running android 12 these might fix it

ouchadam avatar Nov 17 '21 08:11 ouchadam

Yeah, I'll create a new issue if I encounter it again. Just thought it was funny if disappearing notifications was fixed by making them permanent. ;) But maybe it was just a fluke, so I'll wait out another one before creating anything.

I'm running Android 11, but expect to upgrade to 12 within a few weeks.

lindhe avatar Nov 17 '21 10:11 lindhe

fix one issue and create two more :joy: if you are able to reproduce and create a ticket, I'll jump onto it straight away

ouchadam avatar Nov 17 '21 10:11 ouchadam

I've been able to reproduce the non dismissing notification issue, have a fix on the way https://github.com/vector-im/element-android/issues/4505

going to close this issue as it seems like the original issue has been fixed, please reopen if anyone encounters the disappearing notifications again

ouchadam avatar Nov 18 '21 12:11 ouchadam

Unfortunately it seems that I got the issue again. I am running Element version 1.3.7 (no new version available as of today on my phone) on OnePlus 7 Pro with Android 11 (Oxygen OS 11.0.2.1.GM21BA). As soon as I send the message, I can see that the message was immediately automatically mark as read even though we didn't read the message. I can confirm that this is related to Element on Android, because when I switch the phone in airplane mode, the message is not automatically read.

saintger avatar Nov 27 '21 16:11 saintger

Hello, With version 1.3.15, it is still not working. I don't receive any notification, but this time the message is not marked as read (which can be considered as an improvement). I've tried to use the menu entry to debug the notification and all 9 steps executed correctly without any issues.

saintger avatar Feb 01 '22 22:02 saintger

@saintger this sounds like you're experiencing element-hq/element-web#5038 (which has a fix on the way!)

ouchadam avatar Feb 02 '22 15:02 ouchadam

@ouchadam the issue was in the comments in your link: it is due to Adguard which is blocking firebaseinstallations.googleapis.com ! It is strange that it wasn't detected by the menu entry to debug the notification (the 9 steps) but anyway I manually put this domain the whitelist and now notifications seem to work again. I'll monitor how i goes in the following days/weeks and see if the bug here is happening again. Thanks for the hint !

saintger avatar Feb 05 '22 21:02 saintger

This issue appeared on our devices some weeks ago. The only other "client" we have are Smartwatches which show the notification. However it worked before with the watches. Notifications are shown for some seconds and then the element icon disappears from the notification bar.

It seems to happen more often if the screen is on because one is using another app.

svenb1234 avatar Dec 14 '22 06:12 svenb1234

On our phones the issue is not limited to quickly disappearing notifications. Additionally, new messages are immediately marked "read". Which then triggers the auto-disappearance of notifications. This behavior exists at least since version 1.5.10 and regardless of whether the app is installed from the Play Store or from F-Droid. A work-around is to always back out of the room into the overview before going back to the home screen or into another app. If the room view is left open in the background, the "auto-read" kicks in.

bklaesener avatar Dec 14 '22 10:12 bklaesener

I was told that a fix has already been merged and will be part of the next release. No idea though when that is.

svenb1234 avatar Dec 14 '22 15:12 svenb1234

Please release the latest app version on Google Play store.

7underlines avatar Dec 23 '22 09:12 7underlines

Yep, element-hq/element-web#7789 seems stalled. Maybe Google did not reply/release yet.

svenb1234 avatar Dec 23 '22 13:12 svenb1234

As I commented in element-hq/element-web#7232, I found that if you press Back in the app to return to the chats list, then notifications will work fine. At least in my Samsung phone it helps. Maybe if you are inside a room/DM, the app thinks you are reading the new messages even though the app is minimized. That's my guess :/

SPiRiT369 avatar Dec 28 '22 15:12 SPiRiT369

With the new released Element App Version 1.5.20 from Google Play Store this issue seems fixed for me.

7underlines avatar Jan 19 '23 08:01 7underlines

I am still experiencing this with 1.5.28 from the Google Play Store. I ran into this previously shortly before it was fixed, but it resolved after a full reinstall. It has now reappeared (and been problematic again for a week or two).

I'm not getting any notifications from a 1:1 encrypted chat (don't have other 1:1 chats), but am getting notifications as expected from unencrypted rooms with more users, including bots.

I have a pebble smartwatch, and it does vibrate whenever I get a message, however the notifications are dismissed almost instantly - my phone does not make a sound or vibrate, but occasionally the notification dot does appear for a split second. All notifications are logged in the notification history.

I think it's the same symptoms as people are reporting here?

TLATER avatar Apr 11 '23 17:04 TLATER

I get a similar issue as described by @TLATER. I don't know what happened to cause the issue, but I am using a bridged room with WhatsApp using the Mautrix bridge and after about a month running the bridge, the notifications for a specific group in WhatsApp stopped working.

I receive a message, my phone vibrates and Element pops up but is quickly dismissed on the status bar. The only way I find out that I received a message for that specific group is that WhatsApp shows up in the notification list (but vibration is muted for it).

I also have problems marking messages as read in that group inside Element, it keeps increasing the amount of unread notifications even though I've read them.

These groups aren't encrypted in Matrix.

Xinayder avatar Apr 24 '23 11:04 Xinayder

Just to contribute my two cents here: I, again, now get notifications after clearing storage/cache and logging back in. I'll make sure to come back if it breaks again; happy to provide any logs that could help identify the issue.

I don't like clearing my login because of vector-im/element-web#16413 and related issues that make encryption a PITA whenever I do so, but at least I don't feel like I need to have my smartwatch on 100% of the time.

TLATER avatar Apr 24 '23 11:04 TLATER

It's still happening periodically, sadly. My workaround at this point is just to clear data whenever I notice I missed a notification and re-log.

TLATER avatar Jun 09 '23 18:06 TLATER