Skip to content

Notifications are (sometimes) automatically dismissed #7643

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

Closed
Devenda opened this issue Nov 25, 2022 · 48 comments · Fixed by #7734
Closed

Notifications are (sometimes) automatically dismissed #7643

Devenda opened this issue Nov 25, 2022 · 48 comments · Fixed by #7734
Assignees
Labels
A-Notifications 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

@Devenda
Copy link

Devenda commented Nov 25, 2022

Steps to reproduce

Wait for a notification from a chat.
Notifications triggered from the notification troubleshooter are not dismissed.

Outcome

What did you expect?

Notification to stay until manually dismissed or read.

What happened instead?

Notification sound plays and a pop-up is show but afterwards the notification is dismissed (and appears under dismissed notifications in the android settings).

Extra info

It appears as if it is cleared by an other active session (eg in browser) however there are no other sessions except for a Facebook and WhatsApp bridge.

Your phone model

Pixel 3a

Operating system version

Android 12

Application version and app store

No response

Homeserver

v1.5.8

Will you send logs?

Yes

Are you willing to provide a PR?

No

@Devenda Devenda added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Nov 25, 2022
@Devenda
Copy link
Author

Devenda commented Nov 25, 2022

For the time being this only seems to be happening for Facebook Messenger messages, however there are no other sessions active for Facebook except for the bridge itself.

@hho
Copy link

hho commented Nov 25, 2022

Currently happens to me as well (Pixel 7, Android 13, Element 1.5.8), and I don't have anything Facebook.

EDIT: Happens with Synapse 1.71 and 1.72 as well.
EDIT 2: Still present in 1.5.10

@mjmccans
Copy link

This is happening to me as well, and I also have nothing Facebook installed. Pixel 5, Android 13, Element 1.5.8.

@Devenda
Copy link
Author

Devenda commented Nov 26, 2022

Ok, Indeed it seems to happen to WhatsApp messages too.
It looks like it is independent of the bridge/chat.

I also updated all bridges and matrix itself but this did not help.

Does anyone know how to view the matrix log yourself instead of sending them off to the developers?

@joh-ku
Copy link

joh-ku commented Nov 26, 2022

Same here since I updated to v1.5.8 (Pixel 7 Pro, Android 13).

Message notifications appear in notification bar for one second, disappear and messages are marked as read by the sender.

@lephisto
Copy link

Same here on 1.5.8 (OP9pro, Android 13)

@kg333
Copy link

kg333 commented Nov 28, 2022

Confirmed here with no bridges in use whatsoever.

1.5.8 [40105082] (G-b12635)
Pixel 5a, Android 13 with Nov 5 Security update

@codesalatdev
Copy link

After seeing this issue, I observed the same. Today, in around 30% of cases, I felt my phone vibrate but the notification was already dismissed when I looked at it.

1.5.8 [40105082] (G-b12635)

@zqad
Copy link

zqad commented Nov 28, 2022

I have also observed this behavior, and I've done the same observations mentioned previously in this issue: The one conversation where this is very prevalent for both parties (a 1-1 chat, native Matrix messages) show the "read message-bubble" move down almost directly when a message has been sent, despite the other side's app being not active. This is probably at the core of the issue.

1.5.8 [40105082] (G-b12635), Pixel 7 Pro, Android 13 with Nov 5 Security update

@abuttino
Copy link

Same here, Pixel 7 Pro, Android 13, Element 1.5.8

@neutralinsomniac
Copy link

Myself and several of my contacts have been seeing this as well, and it seems to be occurring when I have a chat open with a contact, then I hit home to exit Element instead of using back repeatedly to return to the main chat list and subsequently exit the app. So it seems as though if Element is in the background with a chat open, it'll act as though it's currently in the foreground with you staring at the open chat window.

@raisedintheusa
Copy link

raisedintheusa commented Nov 30, 2022

Same issue on Android 11. I have both an android session and web session open and noticed that if I first receive the notification on web, the unread badge on the tab's favicon does appear and stay until I hear the notification from my phone, then it disappears on its own.

@Arv1k
Copy link

Arv1k commented Nov 30, 2022

Same issue, OnePlus 9r, Android 13.

I also have at least two other sessions from different devices, and notifications arrived today during the day.

@adamrpostjr
Copy link

Same issue Pixel 6 Pro 1.5.8 (57a2860).

@kburgi
Copy link

kburgi commented Dec 1, 2022

Same here, Pixel 5 / Android 13 / Element 1.5.8

@MasseR
Copy link

MasseR commented Dec 1, 2022

Same here. It's as if it's only happening on the latest active discussion. Let's say I'm talking to my wife, pressing home and closing the screen, all the messages from her will be automatically dismissed, while other channels won't. If I chat with someone else, the same happens for that chat.

@kburgi
Copy link

kburgi commented Dec 1, 2022

Same here. It's as if it's only happening on the latest active discussion. Let's say I'm talking to my wife, pressing home and closing the screen, all the messages from her will be automatically dismissed, while other channels won't. If I chat with someone else, the same happens for that chat.

exactly the same behavior here !

In fact, if I go back to the contact list BEFORE leaving the app, the notifications are working as expected.

@mjmccans
Copy link

mjmccans commented Dec 1, 2022

In case it is helpful for debugging purposes or as a temporary workaround for people, I can confirm @neutralinsomniac's comment that the issue seems to happen with whatever chat is visible in the app when it is in the background. As I am typing this I see that @kburgi has also confirmed the same behaviour.

@ripper81
Copy link

ripper81 commented Dec 2, 2022

I can confirm it too on two Androidphones (Motorolla One Vision/Android 11). It seems that the latest update introduced this problem.

@phpwutz
Copy link

phpwutz commented Dec 3, 2022

also experienced on a vivo 2050 and a pixel 5, element version 1.5.8

@soda-pop-ice-cream
Copy link

Same here, OnePlus Nord 2T / Android 12 / 1.5.8 [40105082] (G-b12635)

@RayBB
Copy link

RayBB commented Dec 4, 2022

This is a pretty detrimental bug to the Element UX. Is the core team aware?
@bmarty @onurays

@Fmstrat
Copy link

Fmstrat commented Dec 4, 2022

I'm experiencing this as well, but it's definitely tied to #7701 which is a more accurate report but not fully complete. Full details:

  • If you leave the app open and background it with a chat still open, it's as if the app is in the foreground
  • If you lock your phone, the notification is auto-dismissed, and the message on the bridge is marked as read (for instance with Signal, you also won't get a push notification from the official Signal app)
  • If you have a chat open, and you simply hit the home button and leave the app open, the same thing happens
  • If you swipe the app to close it, notifications go back to normal (and you get the official notification from the originating app [signal] since element/matrix is no longer marking the conversation read on the bridge)

I got lucky and ran into this while setting up a bridge, so saw all the details in the DEBUG log.

@sans-c
Copy link

sans-c commented Dec 5, 2022

I can confirm pretty much everything from above and would like to point out once again that it's not only bridges that suffer from this issue. Also unlike a few other bugs this has nothing to to with F-Droid/Playstore-releases and is also largely independent of Android-verions. I've seen this on 7, 10 and Lineage 18.1 (11).

@bmarty bmarty changed the title Notifications are (sometimes) automatically dismidded Notifications are (sometimes) automatically dismissed Dec 5, 2022
@bmarty bmarty self-assigned this Dec 5, 2022
@bmarty bmarty added A-Notifications S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Dec 5, 2022
@bmarty
Copy link
Member

bmarty commented Dec 5, 2022

Myself and several of my contacts have been seeing this as well, and it seems to be occurring when I have a chat open with a contact, then I hit home to exit Element instead of using back repeatedly to return to the main chat list and subsequently exit the app. So it seems as though if Element is in the background with a chat open, it'll act as though it's currently in the foreground with you staring at the open chat window.

I can repro following this steps, thanks. This is a regression when working on read receipt for thread. Working on a fix with @fedrunov

@phpwutz
Copy link

phpwutz commented Dec 6, 2022

i'm not an official dev, but i took a look at the code and it looks like it filters for "!(roomId = currentRoomId && threadId == currentThreadId)" when deciding wether a certain event triggers a notification - ignoring wether the app is in background or not

@bmarty
Copy link
Member

bmarty commented Dec 6, 2022

(when the app goes to background, currentRoomId and currentThreadId are set to null)

@G2G2G2G
Copy link

G2G2G2G commented Dec 8, 2022

Happens to 2 people in our office, they're on newer android.. and it only happens to the specific room they were last in before closing/background the app.
Doesn't happen to any of the other rooms at that time, only the last one they were in.

@Fmstrat
Copy link

Fmstrat commented Dec 8, 2022

My guess is it originated here: https://github.com/vector-im/element-android/pull/7641/files

Investigating a PR now.

@Fmstrat
Copy link

Fmstrat commented Dec 8, 2022

My native Android is a bit rusty, so I may not be the best for a PR. But this seems to be the issue, introduced about a week ago:

https://github.com/vector-im/element-android/blob/main/vector/src/main/java/im/vector/app/core/pushers/VectorPushHandler.kt#L158

This if check is not validating that the app is in the foreground. Testing for this likely occurred with the app open, and there were no tests against the negative (app backgrounded but conversation still focused).

The only thing that confuses me is the notification actually happens, it's just dismissed very quickly. The code doesn't "appear" to reflect that, but as I said, my time with native Android is a bit rusty.

@neutralinsomniac
Copy link

I've had this issue for well over 2 weeks now so I don't think this code is the culprit.

@Cerothen
Copy link

Cerothen commented Dec 8, 2022

I have issues with this too along with my partner and friends. It seems to have gotten worse recently. I generally find that if I leave the conversation open and just leave the app it happens a lot and backing out to the conversation view seems to prevent it or at least significantly reduce the issue.

I also find that the notification pops in and disappears almost immediately much like @Fmstrat was saying. But leaving the app in the conversation list instead of an active chat room seems to help with the issue, but thats not really a solution.

Reliable notifications are certainly a critically important part of the application.

@davidmehren
Copy link

I have to wonder why it took two weeks for this to be fixed and more than one week after reporting for a member of the dev-team to acknowledge the bug.
Missing notifications seem like a critical bug for a chat app to me.

@Fmstrat
Copy link

Fmstrat commented Dec 9, 2022

@davidmehren I'm not a member of the team, but I would say that's excellent turnaround for commercial software, much less something free.

@JamesBelchamber
Copy link

If you want it fixed faster then submit a PR 🤷 or make a complaint to whoever you're paying for support, referencing the contracted SLAs.

This is incredibly fast, mind, even for commercial software. In an enterprise environment I can guarantee the response would be to send out the workaround then fix the problem "in the next release", which could be months away. With something like Facebook Messenger this specific bug might have been fixed quicker but the resources involved are incomparable (and remember that you do pay for Messenger, just not with cash, so the relationship is different).

Good work team 👍

@G2G2G2G
Copy link

G2G2G2G commented Dec 9, 2022

Yea kinda like the backdoor root exploit in adobe coldfusion (backend web stuff), reported 15 years ago. Good thing that was fixed immediately.. o wait
@davidmehren why does that still exist? That's a real wonder.

@ghost
Copy link

ghost commented Dec 11, 2022

I have also observed this behavior, and I've done the same observations mentioned previously in this issue: The one conversation where this is very prevalent for both parties (a 1-1 chat, native Matrix messages) show the "read message-bubble" move down almost directly when a message has been sent, despite the other side's app being not active. This is probably at the core of the issue.

1.5.8 [40105082] (G-b12635), Pixel 7 Pro, Android 13 with Nov 5 Security update

Oh! That likely explains why the notification autodismissal is unique to our device (Pixel 6 Pro / Android 13); whereas both our device and our partner's device running iPadOS have messages automatically marked as read (which was incredibly confusing when first noticed, since they're visiting relatives in a completely different time zone).

We're running 1.5.11 from F-Droid, if that's helpful.

@austinbutler
Copy link

Still no release with the fix.

@Peterwmoss
Copy link

Peterwmoss commented Dec 12, 2022

As far as I can tell, they are doing weekly releases, and the fix just missed the release five days ago, so it will be in the release coming within the next couple of days, I assume.

Nevermind, I think I have confused the release schedule with another repo.

@ghost
Copy link

ghost commented Dec 23, 2022

Why is v1.5.12 still not out on F-Droid (or even on Google Play)? Notifications have been broken for at least a month now, and yet this seems to be treated like a low-priority issue.

I don't mean to be rude, but notifications are a core function of any messaging app, it is perhaps the single most important core feature of any instant messenger, so shouldn't this be treated as a critical and extremely-high priority issue? Remember that everyone running the latest release (as in, v1.5.11) of Element Android has not been reliably getting notified about new messages for the last month or so now.

I checked #7789 to see how it's coming along, but it just seems to be stalled. What's going on? Any updates? Any ETA? Anything?

@BlastyCZ
Copy link

v1.5.12 is in beta channel on Google Play - it follows that its waiting for review.

@austinbutler
Copy link

I don't mean to be rude, but notifications are a core function of any messaging app, it is perhaps the single most important core feature of any instant messenger, so shouldn't this be treated as a critical and extremely-high priority issue?

Totally agree. They should skip the normal release cycle for a critical patch for this. This is a recurring pattern with Element, though. There's an open bug where sometimes you can't read any messages from someone and I've seen hardly any traction. And that's from 2020!

#1721

I'd really like to move people off of things like Facebook Messenger and onto Matrix, but for one thing I've never had a problem with messages being delivered on Messenger and second Element is the most full-featured client but they don't treat it as a critical messaging client. It's so frustrating.

@kburgi
Copy link

kburgi commented Dec 23, 2022

Totally agree with @austinbutler ... most on my family user are very frustrated and have asked me to leave Element for Signal :-(

@ripper81
Copy link

I wonder why this is still a problem. Such critical problems deserve a hotfix in my opinon. And yes notificationissues are critical when it comes to messengerapps.

@svenb1234
Copy link

The release which fixes this is stuck at 6 of 31 tasks for some time now. #7789 So the issue is rather the release process than the availablity of the fix. Since other apps could release several times within the last week, the question is why it did not work for element?

And maybe it might be worth checking why such a regression could slip through testing in the first place and stay unnoticed to the team. Assuming that everybody within the team is using element themselves.

@austinbutler
Copy link

For those tired of waiting, looks like CI automatically builds an APK that you can sideload.

Go to the latest release for Element Android, then at least for my Pixel 5 vector-gplay-arm64-v8a-release-signed.apk seems to be the right asset. Download and install that to get the fix now.

@bagvand
Copy link

bagvand commented Feb 12, 2023

Hi,
This fix is not a good fix,
After apply this fix we have a new bug.
Position of scroll in list is not saved when message screen goes to pause.
@bmarty
@fedrunov

@lucasmyers97
Copy link

This is currently an issue for me on a Pixel 6 with Android version 15. While my phone is unlocked, a messaging notification is present, but when I lock my phone it disappears and is not visible on the lock screen. Somewhat puzzlingly, when I run the notification diagnostic, the test notification does not disappear upon locking the screen, so it seems like the test notification is being treated differently than a message notification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications 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

Successfully merging a pull request may close this issue.