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

Messages do not get decrypted from Key Storage #2203

Closed
cyrneko opened this issue Feb 13, 2025 · 8 comments
Closed

Messages do not get decrypted from Key Storage #2203

cyrneko opened this issue Feb 13, 2025 · 8 comments

Comments

@cyrneko
Copy link

cyrneko commented Feb 13, 2025

Describe the bug

When verifying the device via the Recovery Key, past messages do not get decrypted with the following message shown in the Show Source option:

Unable to decrypt: DecryptionError: This message was sent before this device logged in. Key backup is working, but we still do not (yet) have the key.

Despite having waited for the backup to finish restoring in the settings...the keys were never actually restored and past history cannot be accessed.

Reproduction

  1. Login with Cinny
  2. Do device verification through a recovery key
  3. Past messages are not decrypted

Expected behavior

Past messages should be decrypted with the keys it should have from key storage.

Platform and versions

1. OS: Void Linux (rolling)
2. Browser: Tauri/Desktop (Flatpak/Flathub.org), Firefox 135 (Void package), Ungoogled Chromium (Flatpak/Flathub.org)
3. Cinny version: 4.3.0, `main` / `dev.cinny.in`
4. Matrix homeserver: thomcat.rocks

Additional context

Interestingly, in trying to debug this and re-logging, this time using another device to verify, and instead another issue (that I might file later if I can consistently reproduce it) occurred. Re-logging and verifying with another device lead to a different error:

** Unable to decrypt: DecryptionError: This message was sent before this device logged in, and key backup is not working. **
@kfiven kfiven changed the title [Vodozemac?] Messages do not get decrypted from Key Storage Messages do not get decrypted from Key Storage Feb 13, 2025
@kfiven
Copy link
Collaborator

kfiven commented Feb 13, 2025

Does the message decrypt on any other device?

@cyrneko
Copy link
Author

cyrneko commented Feb 13, 2025

Does the message decrypt on any other device?

It decrypts on all my other devices just fine. This behavior is exclusively observed in Cinny.

This includes Element X Android, SchildiChat Next and Fractal, all of which also use Vodozemac.

@ajbura
Copy link
Member

ajbura commented Feb 13, 2025

How does the status of "Encryption Backup" look in Cinny UI? Is it connected or disconnected or are there any error shown in UI?

@cyrneko
Copy link
Author

cyrneko commented Feb 13, 2025

How does the status of "Encryption Backup" look in Cinny UI? Is it connected or disconnected or are there any error shown in UI?

It says it is connected.

@jman-schief
Copy link

jman-schief commented Feb 13, 2025

Confirmed. Reloading the page or emptying the cache (from the "About" page) seems to solve temporarily

@cyrneko
Copy link
Author

cyrneko commented Feb 17, 2025

Update as of the time of writing:

On Cinny 4.3.2, AKA the patch that just released, this issue is massively improved, however messages from a few days back (14th of feb. in most rooms) still take a lot of time to eventually be decrypted.

@jman-schief it would be appreciated if you could try a clean login (e.g in another browser or a Firefox container-tab) on app.cinny.in and report whether the issue is as prevalent as before, and report back if you are experiencing something similar in regards to messages from a bit back not decrypting in time

@jman-schief
Copy link

jman-schief commented Feb 17, 2025

@cyrneko 👋

I've tried and it seems to work for me:

  • new login from another Firefox profile
  • after login all messages in a e2ee room are UTD ("Unable To Decrypt")
  • I verify the session with the security key, wait a few secs
  • messages are now all readable (went back to ~2 months ago)

to be noted (if relevant) that I am not in any e2ee room with a lot of users/traffic, so message decryption takes just a few seconds.

For completeness: I am using FF 136.0b6 on Linux

EDIT: for even more completeness: self-hosting using synapse v1.124.0

@cyrneko
Copy link
Author

cyrneko commented Feb 17, 2025

Thanks for checking! I guess that confirms this is an issue on my end then, and with that I'll be closing this issue

Thanks everyone for taking the time!

@cyrneko cyrneko closed this as completed Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants