Skip to content
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

Stuck notifications: New DMs have stuck notifications #23685

Closed
Tracked by #24392
turt2live opened this issue Nov 2, 2022 · 13 comments
Closed
Tracked by #24392

Stuck notifications: New DMs have stuck notifications #23685

turt2live opened this issue Nov 2, 2022 · 13 comments
Labels
A-Notifications O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Z-Synapse

Comments

@turt2live
Copy link
Member

Steps to reproduce

  1. Get invited to a DM
  2. Accept & eventually decrypt the person's message
  3. Soemtimes, the unread notification badge doesn't go away (but when it does it appears to be local echo)
  4. Send a message to reply
  5. Sometimes, the badge still doesn't clear.
  6. Receive a message from the other party, again
  7. Badge goes up to 2 unread messages, despite it only being 1

Outcome

What did you expect?

Not this.

What happened instead?

That :)

This appears to be a multi-week regression, dating back to at least October 24th, 2022. Sending events should be causing the implicit read receipt for my user to be moving up, which means sending messages should clear the notification count. This is not happening, even when sending hidden events in the room.

Restarting the client "resets" the notification counts, if they were cleared by local echo

Operating system

Windows 10 & 11

Application version

Nightly

How did you install the app?

The Internet

Homeserver

t2l.io

Will you send logs?

No

@weeman1337 weeman1337 added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely labels Nov 3, 2022
@germain-gg germain-gg assigned germain-gg and unassigned germain-gg Nov 11, 2022
@github-actions github-actions bot removed the Z-Labs label Nov 15, 2022
@daniellekirkwood
Copy link
Contributor

Instead of creating a new issue, I also encountered this today morning

@Johennes
Copy link
Contributor

Is this really S-Minor?

Impairs non-critical functionality or suitable workarounds exist

The workaround seems to be opening the DM again to clear the unread badge on every launch. This is a pretty jarring experience not only but especially for new users.

@Johennes
Copy link
Contributor

Also to replicate the little content from #23948: In my case it seemed as if the unread count comes from a cached /sync response on launch.

"unread_notifications": {
  "highlight_count": 0,
  "notification_count": 1

@germain-gg germain-gg added S-Major Severely degrades major functionality or product features, with no satisfactory workaround and removed S-Minor Impairs non-critical functionality or suitable workarounds exist labels Dec 21, 2022
@weeman1337
Copy link
Contributor

weeman1337 commented Dec 21, 2022

Variation of this in the duplicate #24070 where the unread count goes away when opening the room but re-appearing when reloading/restarting the app. Also the other issue mentions a normal room and not a DM.

@dbkr
Copy link
Member

dbkr commented Jan 9, 2023

I'm still getting this and it's incredibly annoying. Experimentally, having the other person send another message so your client can send a read receipt for that new message seems to reset the notification count.

@neilisfragile
Copy link
Member

I also have examples of this bug fwiw

@MadLittleMods
Copy link
Contributor

Variation of this in the duplicate #24070 where the unread count goes away when opening the room but re-appearing when reloading/restarting the app. Also the other issue mentions a normal room and not a DM.

👍

I have had this one encrypted DM pop-up as unread every time I refresh Element since December. Consistent every-time I refresh so I can easily grab more debugging info if you provide snippets to run. There hasn't been new activity in the room.

Rageshake logs: https://github.com/matrix-org/element-web-rageshakes/issues/19036

If the person in question from the video is onlooking, please don't send a DM to try to reset things. I'd rather reproduce until this is fixed.

chrome_2023-01-10_15-01-18.-.cut.mp4

Related to #23991

@Johennes
Copy link
Contributor

FWIW #23948 (which was closed as a duplicate of this issue) contains steps that reliably reproduced the issue at the time. I haven't retested them since then though.

@MadLittleMods MadLittleMods added O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience and removed O-Occasional Affects or can be seen by some users regularly or most users rarely labels Jan 11, 2023
@germain-gg
Copy link
Contributor

Me and @andybalaam have looked into this together and it looks like it could be linked to synapse.
We have filed matrix-org/synapse#14837

@andybalaam
Copy link
Member

Investigating further this morning, @gsouquet and I found that while loading the room we do hit a breakpoint at room.ts line 2256: this.addReceipt(synthesizeReceipt(event.sender.userId, event, ReceiptType.Read), true);

So synthetic receipts are being created for events sent by us while we replay from the cache.

Stack trace:

addLiveEvent (webpack:///matrix-js-sdk/src/models/room.ts#2256)
addLiveEvents (webpack:///matrix-js-sdk/src/models/room.ts#2650)
injectRoomEvents (webpack:///matrix-js-sdk/src/sync.ts#1772)
processSyncResponse (webpack:///matrix-js-sdk/src/sync.ts#1420)
promiseMapSeries (webpack:///matrix-js-sdk/src/utils.ts#430)
processSyncResponse (webpack:///matrix-js-sdk/src/sync.ts#1289)
syncFromCache (webpack:///matrix-js-sdk/src/sync.ts#861)
sync (webpack:///matrix-js-sdk/src/sync.ts#746)
sync (webpack:///matrix-js-sdk/src/sync.ts#743)
startClient (webpack:///matrix-js-sdk/src/client.ts#1451)
start (webpack:///matrix-react-sdk/src/MatrixClientPeg.ts#290)
startMatrixClient (webpack:///matrix-react-sdk/src/Lifecycle.ts#832)
doSetLoggedIn (webpack:///matrix-react-sdk/src/Lifecycle.ts#652)
restoreFromLocalStorage (webpack:///matrix-react-sdk/src/Lifecycle.ts#465)
loadSession (webpack:///matrix-react-sdk/src/Lifecycle.ts#145)
loadSession (webpack:///matrix-react-sdk/src/components/structures/MatrixChat.tsx#492)
loadSession (webpack:///matrix-react-sdk/src/components/structures/MatrixChat.tsx#491)
MatrixChat (webpack:///matrix-react-sdk/src/components/structures/MatrixChat.tsx#340)
MatrixChat (webpack:///matrix-react-sdk/src/components/structures/MatrixChat.tsx#320)
Mg (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#135)
pi (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#181)
ck (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#269)
bk (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#250)
ak (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#250)
Tj (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#250)
Lj (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#243)
Jg (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#237)
lk (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#285)
tk (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#289)
Xj (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#244)
tk (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#289)
render (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js#296)
loadApp (webpack:///src/vector/init.tsx#150)
start (webpack:///src/vector/index.ts#228)
<anonymous> (webpack:///src/vector/index.ts#239)
Bootstrap (webpack:///webpack/bootstrap#68)
<anonymous> (https://develop.element.io/bundles/58f640a77998610a2bd1/bundle.js#4286)
Bootstrap (webpack:///webpack/bootstrap#68)
<anonymous> (webpack:///webpack/bootstrap#282)
<anonymous> (https://develop.element.io/bundles/58f640a77998610a2bd1/bundle.js#286)

@madduck
Copy link

madduck commented Jan 26, 2023

I also have this issue with 4 DM rooms. I don't need to restart the app, it's often enough to just let it sit for a bit, and the rooms will appear unread again.

They are all 4 rooms that have not had any activity in a while. I've just sent pings in 2 of them, hopefully the others will reply and in theory then, these should get reset. Then at least we'll know it might have to do with read receipts that were somehow missed.

@Johennes Johennes changed the title New DMs have stuck notifications Stuck notifications: New DMs have stuck notifications Feb 1, 2023
@andybalaam
Copy link
Member

@arthursinclair this issue is where we are tracking the problem you rageshook about. Thank you for the report.

@germain-gg
Copy link
Contributor

Fixed by matrix-org/matrix-js-sdk#3139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Z-Synapse
Projects
None yet
Development

No branches or pull requests

10 participants