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

Memberlist out of sync in fresh DM #20962

Closed
lampholder opened this issue Feb 7, 2022 · 8 comments
Closed

Memberlist out of sync in fresh DM #20962

lampholder opened this issue Feb 7, 2022 · 8 comments
Labels
A-DMs A-Member-List O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect X-Release-Blocker Z-Rageshake Has attached rageshake (not for log submission process) Z-UISI Unable to decrypt errors

Comments

@lampholder
Copy link
Member

Steps to reproduce

  1. Received and accepted an invite to a DM
  2. Chatted successfully for a bit
  3. Other participant complained of UISIs
  4. I noticed that Element Desktop Windows thought I was the only person in the room
  5. Other Elements (Mac, Android) are fine and know that we're both in the room

Outcome

What did you expect?

Memberlist to be accurate

What happened instead?

Memberlist was missing a participant

Operating system

No response

Application version

No response

How did you install the app?

No response

Homeserver

me on lant.uk, other participant on their own personal homeserver (not matrix.org)

Will you send logs?

Yes

@aaronraimist aaronraimist added A-DMs A-Member-List Z-Rageshake Has attached rageshake (not for log submission process) labels Feb 7, 2022
@SimonBrandner SimonBrandner added the S-Major Severely degrades major functionality or product features, with no satisfactory workaround label Feb 8, 2022
@germain-gg germain-gg added the O-Uncommon Most users are unlikely to come across this or unexpected workflow label Feb 8, 2022
@nervous-inhuman
Copy link
Contributor

nervous-inhuman commented Feb 8, 2022

+1

Seems to break encryption as well, the other party couldn't decrypt my messages. Restarting Element worked, /discardsession did not.

Using macOS desktop client built from develop branch.

@lampholder
Copy link
Member Author

Yep, my encryption also died in this room from this device. Other devices (which maintained a correct view of participants in the room) were not affected.

@ara4n
Copy link
Member

ara4n commented Feb 10, 2022

I just got this too. @novocaine, surely this is a release blocker?

@novocaine novocaine added 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 Feb 10, 2022
@novocaine
Copy link
Contributor

I just got this too. @novocaine, surely this is a release blocker?

Agree, due to number of reports

@novocaine novocaine added X-Release-Blocker S-Critical Prevents work, causes data loss and/or has no workaround and removed S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Feb 10, 2022
dbkr added a commit to matrix-org/matrix-js-sdk that referenced this issue Feb 10, 2022
dbkr added a commit to matrix-org/matrix-js-sdk that referenced this issue Feb 10, 2022
* Log when member event membership is undefined

To diagnose element-hq/element-web#20962

* May as well have a stack trace too
@ara4n
Copy link
Member

ara4n commented Feb 11, 2022

I just got this in a non-DM (my client doesn't think @Erethon is in the Full Mesh VoIP room, so he's getting UISIs from me)

@dbkr
Copy link
Member

dbkr commented Feb 11, 2022

I've just managed to repro this (although not reliably). It's due to a member event that's pointing the wrong way: the current state of the room has ended up with a member event with forwardLooking: false. It has no prevContent, so the membership has been set to undefined. Current state events should always be forward looking since they're telling us about the state from this point forwards, so somehow this has got clobbered with a backwards-looking version of the event.

This plausibly could be the change we reverted (matrix-org/matrix-js-sdk#2171) although I'm still not 100% sure how: somehow the event must be arriving from some channel that's backfilling it before it's arriving via the right source (timeline? lazy loading?).

This means I'm more confident that this is the same underlying cause as #20981

@dbkr
Copy link
Member

dbkr commented Feb 11, 2022

Update, no - the forwardLooking flag is set when we set the event metadata (which is when we add it to the timeline), so the scenario is that we get the state events when you load the room, then backfill and see the state events in its original place, at which point we re-use it and mangle it to backwards-looking because you're backfilling.

Germain is writing a test to confirm this behaviour and also be a general regression test. If our suspicions are confirmed, we can consider this fixed thanks to the revert.

@dbkr
Copy link
Member

dbkr commented Feb 14, 2022

No more reports of this since the revert so I'm going to say that this is fixed

@dbkr dbkr closed this as completed Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-DMs A-Member-List O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect X-Release-Blocker Z-Rageshake Has attached rageshake (not for log submission process) Z-UISI Unable to decrypt errors
Projects
None yet
Development

No branches or pull requests

8 participants