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

A room with only private read receipt keeps being marked as unread. #23027

Closed
ara4n opened this issue Aug 8, 2022 · 2 comments · Fixed by matrix-org/matrix-js-sdk#2585
Closed
Assignees
Labels
A-Read-Receipts O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Regression X-Release-Blocker

Comments

@ara4n
Copy link
Member

ara4n commented Aug 8, 2022

Steps to reproduce

  1. Turn on private RRs
  2. Get DMed by a user
  3. Answer the DM
  4. Send some messages in the DM
  5. Observe that the DM subsequently gets incorrectly flagged as unread (presumably because there is no RM or RR in the room at all, only a private RR?)

(appaprently the room where this was happening (!iKaweBjcahmPGZlkqW:thirdroom.dev) had a prefixed private RR in it: $OyTvOe_8mTpK_f_Lf9cLR63ZdyOvIGvCCQrGqBokXxg )

Outcome

What did you expect?

Random DMs shouldn't keep appearing as unread.

Operating system

No response

Application version

nightly

How did you install the app?

nightly

Homeserver

matrix.org

Will you send logs?

No

@ara4n ara4n added the T-Defect label Aug 8, 2022
@duxovni duxovni added S-Minor Impairs non-critical functionality or suitable workarounds exist A-Read-Receipts O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Aug 8, 2022
@turt2live turt2live self-assigned this Aug 8, 2022
@RiotRobot RiotRobot added this to In Progress in Web App Team Aug 8, 2022
@turt2live
Copy link
Member

With all the data we have on this, I think it's a long-standing issue to do with Element "randomly" (deterministic symptoms not yet discovered) deciding that rooms are suddenly unread during startup. Usually this happens to larger rooms, but can happen to DMs as well.

I don't think this is related to recent Synapse work or hidden read receipts, at least given the problem description.

@turt2live turt2live removed their assignment Aug 10, 2022
@turt2live turt2live removed this from In Progress in Web App Team Aug 10, 2022
@SimonBrandner SimonBrandner self-assigned this Aug 11, 2022
@SimonBrandner SimonBrandner added X-Regression X-Release-Blocker O-Occasional Affects or can be seen by some users regularly or most users rarely and removed O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Aug 11, 2022
@SimonBrandner
Copy link
Contributor

It turns out this is an RR issue after all: I've just reproduced it by accident in my DM with Dave. The Room::getEventReadUpTo() method fails under certain conditions: if we don't have RRs of all types, we fallback to using timestamps for the comparison, the problem then is that the ts comparison algorithm doesn't take into account the stable private read receipt not being defined, so it fails and we fallback again to picking by hand, this means the unstable private RR is chosen because it tends to have precednce even if there actually is a new RR of m.read type.

This can now be considered a release blocker though a fairly simple one to fix and test

su-ex added a commit to SchildiChat/matrix-js-sdk that referenced this issue Aug 22, 2022
* Add txn_id support to sliding sync ([\matrix-org#2567](matrix-org#2567)).
* Emit an event when the client receives TURN servers ([\matrix-org#2529](matrix-org#2529)).
* Add support for stable prefixes for MSC2285 ([\matrix-org#2524](matrix-org#2524)).
* Remove stream-replacement ([\matrix-org#2551](matrix-org#2551)).
* Add support for sending user-defined encrypted to-device messages ([\matrix-org#2528](matrix-org#2528)).
* Retry to-device messages ([\matrix-org#2549](matrix-org#2549)). Fixes element-hq/element-web#12851.
* Sliding sync: add missing filters from latest MSC ([\matrix-org#2555](matrix-org#2555)).
* Use stable prefixes for MSC3827 ([\matrix-org#2537](matrix-org#2537)).
* Fix: Handle parsing of a beacon info event without asset ([\matrix-org#2591](matrix-org#2591)). Fixes element-hq/element-web#23078.
* Fix finding event read up to if stable private read receipts is missing ([\matrix-org#2585](matrix-org#2585)). Fixes element-hq/element-web#23027.
* Fixed a sliding sync issue where history could be interpreted as live events. ([\matrix-org#2583](matrix-org#2583)).
* Don't load the sync accumulator if there's already a sync persist in flight ([\matrix-org#2569](matrix-org#2569)).
su-ex added a commit to SchildiChat/matrix-js-sdk that referenced this issue Sep 1, 2022
* Re-emit room state events on rooms ([\matrix-org#2607](matrix-org#2607)).
* Add ability to override built in room name generator for an i18n'able one ([\matrix-org#2609](matrix-org#2609)).
* Add txn_id support to sliding sync ([\matrix-org#2567](matrix-org#2567)).
* Refactor Sync and fix `initialSyncLimit` ([\matrix-org#2587](matrix-org#2587)).
* Use deep equality comparisons when searching for outgoing key requests by target ([\matrix-org#2623](matrix-org#2623)). Contributed by @duxovni.
* Fix room membership race with PREPARED event ([\matrix-org#2613](matrix-org#2613)). Contributed by @jotto.
* fixed a sliding sync bug which could cause the `roomIndexToRoomId` map to be incorrect when a new room is added in the middle of the list or when an existing room is deleted from the middle of the list. ([\matrix-org#2610](matrix-org#2610)).
* Fix: Handle parsing of a beacon info event without asset ([\matrix-org#2591](matrix-org#2591)). Fixes element-hq/element-web#23078. Contributed by @kerryarchibald.
* Fix finding event read up to if stable private read receipts is missing ([\matrix-org#2585](matrix-org#2585)). Fixes element-hq/element-web#23027.
* fixed a sliding sync issue where history could be interpreted as live events. ([\matrix-org#2583](matrix-org#2583)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Read-Receipts O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Regression X-Release-Blocker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants