Desktop - Unread messages badge won’t update after reading messages
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Expected Result:
After reading the new messages, the notification badge in app icon is updated to the number of unread messages.
Actual Result:
Notification badge does not update when unread messages are read.
Action Performed:
- Send some messages to an account logged in Desktop app so there are unread messages
- Check the number of unread messages in the badge of the desktop app
- Open unread messages
Workaround:
Visual issue, no need for workaround
Platform:
Where is this issue occurring?
Web iOS Android Desktop App ✔️ Mobile Web
Version Number: 1.0.28-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

Expensify/Expensify Issue URL:
From @saracouto https://expensify.slack.com/archives/C01GTK53T8Q/p1619016579459500
ISSUE: unread messages notifications don’t go away:
Triggered auto assignment to @SofiedeVreese (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
Issue looks good. I assumed there'd be other issues similar to this, as it's an ongoing issue but I can't find any.
Removing assignment and adding Engineering to further triage, seems like a great External issue.
Triggered auto assignment to @TomatoToaster (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Hmm ok I do agree this could make a good external issue. Right now though I'm hesitant because the solution to this might not be purely front-end. Since it's dealing with notifications, the solution might have to be internal. I asked here about it, but for the moment I'll keep it assigned to me. I might even get time to work on it soon.
Hmm ok that discussion didn't seem to go much elsewhere. I think this is alright to stay internal and I'll be the one to work on it now.
Didn't get time investigate this yet, but I'm still planning to work on this for now.
Have not forgotten about this! It's just a little hard to diagnose. I've been able to replicate it sometimes, but I'm still trying to figure out how this is happening.
Ok so recreating this has been tricky. Here's how I've been able to do it (and not consistently!): I'd activate ngrok, send some messages to myself from the web client to a user logged in on the desktop client. Kill ngrok. Wait a long time and then come back to the desktop app and it fails to "read" these notifications. Usually thoguh, if I open the account on web, it'll clear those reads by the time I come back to desktop.
I checked in w/ Sara and her messages are still growing, but sometimes she is able to read messages and lower the number. Maybe this is happening on only on certain reoprts. I'm almost sure this is a problem in Web-Expensify and not in Expensify.cash, but I'm not sure yet cause I still haven't found the cause. Still investigating!
Still yet to figure out WHY this is happening. However Sara has made some intersting discoveries. Here's what we know:
- When redownloading and relogging into the desktop client, the badge numbers actually ROSE. From 500ish to 1500ish.
- When she had gone to an older group chat, which she had already read but for some reason was marked unread, it had lowered the badge numbers (from 1500 to 500ish).
- Those "unread chats" are not being pushed to the top of the list
I think one of the next things we should work on is to make sure the "marked as unread" chats get pushed to the top (I'm noticing this is not the case for older chats I mark as unread). Also, we should figure out if chats are being "marked unread" without the user doing anything. Group chats might be a culprit in some way or that might be a coincidence.
I'm hoping if we fix the bug that's preventing "marked unread" chats from bubbling up to the top first, we'll be able to solve the huge badge number problem more easily. That's what I'll try to work on next.
I'm going to unassign myself for now. I no longer have the bandwidth for this so I'll leave it for someone else to maybe fix.
Not sure why this was not tagged as external, doing that now
Triggered auto assignment to @bfitzexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Upwork posting here
FYI - this has been resolved on my end, no more unread messages!
Given this was first reported >2 months ago and has resolved for Sara, I'm going to close this and the UW posting until we have new reports of this occurring.