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

Unable to decrypt after verification until reload #23333

Closed
weeman1337 opened this issue Sep 21, 2022 · 5 comments · Fixed by matrix-org/matrix-js-sdk#2921 or matrix-org/matrix-js-sdk#3029
Labels
A-E2EE A-E2EE-Key-Backup 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 Z-UISI Unable to decrypt errors

Comments

@weeman1337
Copy link
Contributor

weeman1337 commented Sep 21, 2022

Steps to reproduce

  1. Don't set up key backup.
  2. Have working session with all keys available.
  3. Have an encrypted room with some messages.
  4. Sign in to a second session.
  5. Open the room in the second session.
  6. „Unable to decrypt“ visible.
  7. Go to security settings and verify your device with the other session.
  8. Look at the room

Outcome

What did you expect?

Messages are now visible

What happened instead?

Still „Unable to decrypt“

Reloading the page gives a high chance for the messages to appear.

Operating system

Ubuntu 22.04.1 LTS

Browser information

Firefox 105.0 (64-bit)

URL for webapp

https://develop.element.io/

Application version

Version von Element: 287a735-react-71cf9bf932cc-js-7e24cb6cae8c Version von Olm: 3.2.12

Homeserver

matrix.org

Will you send logs?

No

@weeman1337 weeman1337 added T-Defect S-Major Severely degrades major functionality or product features, with no satisfactory workaround Z-UISI Unable to decrypt errors O-Occasional Affects or can be seen by some users regularly or most users rarely labels Sep 21, 2022
@turt2live
Copy link
Member

I believe this is a race condition: we appear to block decryption until after all the keys are received, so on large-ish backups this can take a while.

@turt2live turt2live added S-Minor Impairs non-critical functionality or suitable workarounds exist A-E2EE A-E2EE-Key-Backup Team: Crypto and removed S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Sep 21, 2022
@weeman1337
Copy link
Contributor Author

From a user perspective I would still say this is an S-Major. Because Element ends up in an unusable state for me = cannot read my messages.

@giomfo
Copy link
Member

giomfo commented Sep 22, 2022

Is there an actual reason to block the decryption until all the keys are received?

  • if yes, we may ask for a design to let the user know about this, this would improve at least the user experience. Currently the user just believes the decryption is not working and triggers multiple new key requests
  • if no, we should fix it to improve the end user experience

@weeman1337
Copy link
Contributor Author

Reopening this one because we had to roll back the fix. It caused existing sessions to send all the keys around. That eventually leads to thousands of requests.

@weeman1337 weeman1337 reopened this Jan 5, 2023
su-ex added a commit to SchildiChat/matrix-js-sdk that referenced this issue Jan 15, 2023
* Process `m.room.encryption` events before emitting `RoomMember` events ([\matrix-org#2914](matrix-org#2914)). Fixes element-hq/element-web#23819.
* Don't expose `calls` on `GroupCall` ([\matrix-org#2941](matrix-org#2941)).
* Support MSC3391: Account data deletion ([\matrix-org#2967](matrix-org#2967)).
* Add a message ID on each to-device message ([\matrix-org#2938](matrix-org#2938)).
* Enable multiple users' power levels to be set at once ([\matrix-org#2892](matrix-org#2892)). Contributed by @GoodGuyMarco.
* Include pending events in thread summary and count again ([\matrix-org#2922](matrix-org#2922)). Fixes element-hq/element-web#23642.
* Make GroupCall work better with widgets ([\matrix-org#2935](matrix-org#2935)).
* Add method to get outgoing room key requests for a given event ([\matrix-org#2930](matrix-org#2930)).
* Fix messages loaded during initial fetch ending up out of order ([\matrix-org#2971](matrix-org#2971)). Fixes element-hq/element-web#23972.
* Fix #23919: Root message for new thread loaded from network ([\matrix-org#2965](matrix-org#2965)). Fixes element-hq/element-web#23919.
* Fix #23916: Prevent edits of the last message in a thread getting lost ([\matrix-org#2951](matrix-org#2951)). Fixes element-hq/element-web#23916 and element-hq/element-web#23942.
* Fix infinite loop when restoring cached read receipts ([\matrix-org#2963](matrix-org#2963)). Fixes element-hq/element-web#23951.
* Don't swallow errors coming from the shareSession call ([\matrix-org#2962](matrix-org#2962)). Fixes element-hq/element-web#23792.
* Make sure that MegolmEncryption.setupPromise always resolves  ([\matrix-org#2960](matrix-org#2960)).
* Do not calculate highlight notifs for threads unknown to the room ([\matrix-org#2957](matrix-org#2957)).
* Cache read receipts for unknown threads ([\matrix-org#2953](matrix-org#2953)).
* bugfix: sliding sync initial room timelines shouldn't notify ([\matrix-org#2933](matrix-org#2933)).
* Redo key sharing after own device verification ([\matrix-org#2921](matrix-org#2921)). Fixes element-hq/element-web#23333.
* Move updated threads to the end of the thread list ([\matrix-org#2923](matrix-org#2923)). Fixes element-hq/element-web#23876.
* Fix highlight notifications increasing when total notification is zero ([\matrix-org#2937](matrix-org#2937)). Fixes element-hq/element-web#23885.
* Fix synthesizeReceipt ([\matrix-org#2916](matrix-org#2916)). Fixes element-hq/element-web#23827 element-hq/element-web#23754 and element-hq/element-web#23847.
su-ex added a commit to SchildiChat/matrix-js-sdk that referenced this issue Jan 19, 2023
* Remove extensible events v1 field population on legacy events ([\matrix-org#3040](matrix-org#3040)).
* Improve hasUserReadEvent and getUserReadUpTo realibility with threads ([\matrix-org#3031](matrix-org#3031)). Fixes element-hq/element-web#24164.
* Remove video track when muting video ([\matrix-org#3028](matrix-org#3028)). Fixes element-hq/element-call#209.
* Make poll start event type available (PSG-962) ([\matrix-org#3034](matrix-org#3034)).
* Add alt event type matching in Relations model ([\matrix-org#3018](matrix-org#3018)).
* Remove usage of v1 Identity Server API ([\matrix-org#3003](matrix-org#3003)).
* Add `device_id` to `/account/whoami` types ([\matrix-org#3005](matrix-org#3005)).
* Implement MSC3912: Relation-based redactions ([\matrix-org#2954](matrix-org#2954)).
* Introduce a mechanism for using the rust-crypto-sdk ([\matrix-org#2969](matrix-org#2969)).
* Support MSC3391: Account data deletion ([\matrix-org#2967](matrix-org#2967)).
* Fix threaded cache receipt when event holds multiple receipts ([\matrix-org#3026](matrix-org#3026)).
* Fix false key requests after verifying new device ([\matrix-org#3029](matrix-org#3029)). Fixes element-hq/element-web#24167 and element-hq/element-web#23333.
* Avoid triggering decryption errors when decrypting redacted events ([\matrix-org#3004](matrix-org#3004)). Fixes element-hq/element-web#24084.
* bugfix: upload OTKs in sliding sync mode ([\matrix-org#3008](matrix-org#3008)).
* Apply edits discovered from sync after thread is initialised ([\matrix-org#3002](matrix-org#3002)). Fixes element-hq/element-web#23921.
* Sliding sync: Fix issue where no unsubs are sent when switching rooms ([\matrix-org#2991](matrix-org#2991)).
* Threads are missing from the timeline ([\matrix-org#2996](matrix-org#2996)). Fixes element-hq/element-web#24036.
* Close all streams when a call ends ([\matrix-org#2992](matrix-org#2992)). Fixes element-hq/element-call#742.
* Resume to-device message queue after resumed sync ([\matrix-org#2920](matrix-org#2920)). Fixes matrix-org/element-web-rageshakes#17170.
* Fix browser entrypoint ([\matrix-org#3051](matrix-org#3051)). Fixes matrix-org#3013.
* Fix failure to start in firefox private browser ([\matrix-org#3058](matrix-org#3058)). Fixes element-hq/element-web#24216.
* Correctly handle limited sync responses by resetting the thread timeline ([\matrix-org#3056](matrix-org#3056)). Fixes element-hq/element-web#23952.
@richvdh
Copy link
Member

richvdh commented Apr 3, 2024

This sounds like #27009.

@richvdh richvdh closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE A-E2EE-Key-Backup 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 Z-UISI Unable to decrypt errors
Projects
None yet
4 participants