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

New users (& devices?) joining a megolm room are not being recognised and encrypted for (O HAI is broken?) #2156

Closed
ara4n opened this issue Sep 10, 2016 · 5 comments
Assignees
Labels
P1 S-Critical Prevents work, causes data loss and/or has no workaround T-Defect

Comments

@ara4n
Copy link
Member

ara4n commented Sep 10, 2016

Specifically, the m.new_device my test account sent a broken O HAI with content { messages: {}}, but https://github.com/matrix-org/matrix-js-sdk/pull/200/files#diff-3d7f0c7d5957a1a25c5f62640040bb6bR873 suggests it should be spamming all my users to tell them about my new device.

@richvdh
Copy link
Member

richvdh commented Sep 10, 2016

It shouldn't be issing oh hais at all in the case of a user joining a room (we have m.room.member to do that for us). So, uh, dunno.

@ara4n
Copy link
Member Author

ara4n commented Sep 10, 2016

i guess then a related problem is that other people in the room aren't
picking up the new user/device, so the new user can't see what's going
on (and sees only 'unknown group session' errors from everyone else).

@ara4n ara4n changed the title Vector is issuing broken O HAI messages for new users joining a megolm room New users (& devices?) joining a megolm room are not being recognised and encrypted for (O HAI is broken?) Sep 12, 2016
@ara4n ara4n added T-Defect P1 S-Critical Prevents work, causes data loss and/or has no workaround X-Blocked labels Sep 12, 2016
@ara4n
Copy link
Member Author

ara4n commented Sep 12, 2016

@erikjohnston was also saying that he was seeing his HS choking on O HAI message received over federation somehow and failing to wakeup the eventstream to deliver them to clients?

@NegativeMjark
Copy link
Contributor

It looks like the m.new_device (O HAI) messages are working as intended. However there are a few race conditions when joining rooms that won't be handled by them.

As a workaround I'm think of making the following changes to the JS sdk:

  1. Include the sender device_id in the encrypted messages.
  2. When vector receives a message that it cannot decrypt it will send a m.new_device message to the sender device.

This means that at least it will be able to decrypt subsequent messages from that sender device.

@ara4n Does that sound sane?

@NegativeMjark
Copy link
Contributor

Turns out that the issue that @ara4n was seeing was because he was using a local build of vector using a stale version of olm. This has been fixed by upgrading his version of olm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 S-Critical Prevents work, causes data loss and/or has no workaround T-Defect
Projects
None yet
Development

No branches or pull requests

3 participants