signalapp / signalapp/Signal-Android
Android app shows countless notifications rapidly for old messages, already read in the desktop app
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 29.4k
- Forks
- 6.9k
- PR merge metrics
- No merged PRs in 30d
Description
- I have searched open and closed issues for duplicates
- I am submitting a bug report for existing functionality that does not work as intended
- I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
- This isn't a feature request or a discussion topic
Bug description
Signal Android receives notifications for messages that have been read on Signal Desktop. Apparently this also happens when both apps are open – but since the message comes to both apps at the same moment, I guess that isn't so weird. Also, I never use both at the same time, so I can't vouch for that. However: when the Android app has been offline for some time while a conversation was continued in the desktop app, all hell breaks loose when the Android app is turned on (connected to the internet). Messages – SEEN messages from the desktop – start coming in, one by one, each with a notification. Well, almost, because they come faster than the notifications are able to catch up. Then, as they keep coming, they are immediately getting ticked as read. But for a few minutes, the phone rings, buzzes, and/or displays a visual notification – depending on the person's settings – unless you completely turn off the notifications prior to turning on the internet connection. This has been an issue for years and remains one, I don't believe this is a feature (certainly not a good one).
It used to be a problem on the desktop too, but it was fixed by making a loading screen. The app isn't usable until the messages are downloaded. This might not be the best way, but I guess it's better than crazy notifications firing five times a second. Maybe something similar could work on the mobile too? Or, if this is possible, maybe allow the user to message immediately, while syncing, starting at the most recent messages, instead of chronologically. That allows the user to get a quick reminder about the last topic, and doesn't keep flashing new messages in the conversation – they would quietly come in the background.
Another idea: get the message, first check the read status, and then if it's really a new message, notify. I don't know about coding it, but it sounds simple enough and should fix the whole problem. This comes from an earlier issue where the poster pointed out that the read status appears only after the notification has already sounded.
There could also be only one notification for messages that have already been read on the desktop, and then notifications for messages that are new (first seen now, when looking at the Android app). I even think it might be the case that when I get completely new messages while the Android app is on, there is only one notification per conversation, even if that person sent me more messages. So it should apply even more to already read ones.
Other mentions of, or related to this issue:
- in #5519, the original post isn't exactly about this, but this comment describes exactly this problem.
- #6273 is about the divider between old and new messages. I haven't had a chance to check how this works (and if), but it sounds like the divider illustrates how the desktop messages are treated as new even though they've been read.
- #6126 is this exact issue.
- in #4905 the poster mentions both apps receiving messages and notifications at the same time when they're both online, but particularly this reply is about the problem when coming back from offline state, and mentions the way it should be: "Can you fix the client to download and process all of the synced states before deciding whether to show any notifications?"
- #3165 is one of the earlier mentions of this, and doesn't explicitly talk about the circumstances, but it's probably the same problem.
- in #5410 it is pointed out that the issue is a duplicate of very similar ones. But that issue was posted over 2,5 years ago and it's still relevant. Not to mention the earlier issues.
- #5741 mentions the phone buzzing while using the desktop, but it's related.
- and finally #778, from February 2014, which may be the first mention of this problem. It describes the same thing: phone's been off while conversation continued on desktop, phone gets back online, cue many, many notifications. @moxie0 self-assigned also in 2014, no other actions there happened. More happened on #3165 instead (lots of mentions mostly), although there is no asignee or milestones there. Moxie closed that issue with this commit saying that it fixes two other issues, even though it doesn't fix the real problem of a LOT of notifications coming after a longer time offline, as opposed to while using the desktop and mobile at the same time.
Steps to reproduce
- have a conversation in the Android app
- close the Android app, turn off the internet connection
- continue the conversation in the desktop app (well, perhaps this and the first point not necessary – it doesn't have to be the same conversation, or it could be several)
- turn on the internet connection and Android app (if it still receives messages while not active, you don't have to turn it on. But I used to not get messages after I think force quitting the app until opening it, so I'm pointing it out)
Actual result: The Android app displays and sounds tens of notifications, getting every single message as if it were a new one, only later marking it as read.
Expected result: The messages that have already been read on the desktop app should be synced quietly and in the background, as they are already part of the conversation. If there are any new, unread messages, they can get a notification, either first (if syncing the newest, unread messages first) or after the earlier part has been updated (if syncing in chronological order).
Device info
Device: HTC 10
Android version: 8.0.0
Signal version: 4.30.8
Desktop: Ubuntu 18.04.1 LTS, Signal version 1.18.1
Link to debug log
android: https://debuglogs.org/a746288528426141256c835a6ebb61b215b45cebfb598592c6ce659754b3238d
desktop: https://debuglogs.org/b5987c5baecc47485d368ed87d66933f44a8b7ed20f4c9c93324fba04237a503
Note: I had a desktop conversation with a number ending in 84. There are three more recent messages from a number ending in 13 that were sent later, when my Signal was completely offline, and came to my Android app as new, unread messages. When I turned the desktop app on to get the debug log, there was of course the loading screen, no notifications, and these messages were correctly shown as read.
Oh, and by the way: while getting the phone debug log, I noticed an EMBARRASSING spelling error in the translated content. How should I report it for fixing?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The payload names no source file or test entry point. Start by reproducing the offline-sync scenario with the supplied device and debug-log details, then trace how synced read states are processed before notifications are shown. Done means messages already read on Desktop sync without individual notifications while genuinely unread messages still notify.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100