element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.36k stars 717 forks source link

Unable to read history messages in encrypted group room #5482

Open Fmajor opened 2 years ago

Fmajor commented 2 years ago

Steps to reproduce

Assume you are A

  1. A create a new private space
  2. A invite some user B into this space
  3. A create a new room in this space: with default settings
    • Room name: test-history
    • Room access => space members only
    • Room seetings:
    • enable encryptiong: on
  4. A say wait for B in the chat room
  5. B find test-history room in the Explore rooms page
  6. B join the room
  7. B can not decrypt A's last message, when dev mode is on, B get **Unable to decrypt: KEYS_WITHHELD**
    • In A's Advanced settings> Dev Tools => Key Requests page
    • in AUDIT TRAIL, we can see one m.rom_key_request from B
    • in INCOMING, we can see the above request, state is UNABLE_TO_PROCESS

more info

Outcome

What did you expect?

At step 8, B can decrypt A's message: wait for B

What happened instead?

At step 8, B can not decrypt A's message, get debug message: Unable to decrypt: KEYS_WITHHELD

Your phone model

google pixel 4

Operating system version

Android 12

Application version and app store

Element:1.4.2, Matrix SDK Version:1.4.2, olm version:3.2.10

Homeserver

Synapse 1.52.0

Will you send logs?

No

ouchadam commented 2 years ago

thanks for the detailed reproduction steps :+1: