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

Enabling chat backup fails badly on large accounts and corrupts your online backup. #1976

Closed
ara4n opened this issue Oct 29, 2023 · 6 comments
Labels
A-E2EE Encryption O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Critical Prevents work, causes data loss and/or has no workaround S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue Z-Labs A defect in a feature that is behind a labs flag.

Comments

@ara4n
Copy link
Member

ara4n commented Oct 29, 2023

Steps to reproduce

  1. Enable chat backup in labs
  2. Enter your recovery passphrase in settings and enable the backup.

Subsequent failure modes include:

  • Repeated prompts to 'confirm your recovery key' in room list; re-entering the key doesn't seem to help.
  • Stuck red badge on the settings icon (which doesn't map through to a badge within)
  • Repeated prompts to 'confirm recovery key' in settings (despite having already provided it)
  • Past history is shown as UTD (although the blue 'past history undecryptable' prompt has gone away)

I ended up entering the recovery key (passphrase) about 4 times, and left the app foregrounded for roughly an hour to see if it needed time to download the backup (which didn't help).

My megolm backup is currently 328MB.

Outcome

What did you expect?

Chat backup should:

  • Work for powerusers, otherwise we undo all the good work from Ignition in terms of providing a great experience for powerusers to help them advocate for the app.
  • Explain in the UI that backup is for accessing history, not just storing keys
  • Give feedback on whether the backup restoration succeeded or not
  • Show some kind of progress on backup restoration so you know if you need to keep the app running in the fg to let it complete
  • Retry restoration if it fails?
  • Not talk about "confirming recovery key" if it's asking you to enter it for the first time - surely it's not a confirmation (which implies that you're confirming a user action which the user just performed) but a plain old "enter your recovery key"?
  • Enabling backup should be O(1) with size of backup (e.g. by incrementally restoring it in the background, resuming as needed, starting with the most recent keys), to avoid penalising powerusers.

What happened instead?

Very cryptic and suboptimal experience trying to use E2EE backup as a poweruser.

Meanwhile my Element Desktop coughed up...

image

...and no longer seems to recognise my recovery passphrase :|

Your phone model

iPhone 12 Pro Max

Operating system version

ios 16.7

Application version

421

Homeserver

matrix.org

Will you send logs?

Yes

@ara4n ara4n added the T-Defect label Oct 29, 2023
@pixlwave pixlwave added A-E2EE Encryption S-Major Severely degrades major functionality or product features, with no satisfactory workaround 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 labels Nov 2, 2023
@ara4n ara4n changed the title Enabling chat backup fails badly on large accounts. Enabling chat backup fails badly on large accounts and corrupts your online backup. Nov 10, 2023
@ara4n
Copy link
Member Author

ara4n commented Nov 10, 2023

apparently EX went and created a new backup version, using a new private key from somewhere which doesn't match the previous one, thus breaking backup everywhere.

@manuroe manuroe added X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue Z-Labs A defect in a feature that is behind a labs flag. labels Nov 15, 2023
@ara4n ara4n added O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience and removed O-Occasional Affects or can be seen by some users regularly or most users rarely labels Dec 7, 2023
@ara4n
Copy link
Member Author

ara4n commented Dec 7, 2023

This is really bad, in that it corrupts your backups for all clients (with the private key to the new backup stuck in the guts of EXI), and if you then lose keys on other devices then you could lose your history.

@manuroe
Copy link
Member

manuroe commented Dec 8, 2023

This nasty bug happened during the development of the backup feature. The SDK no more recreates a new backup after entering the recovery key.

@manuroe manuroe closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2023
@manuroe
Copy link
Member

manuroe commented Dec 8, 2023

FTR, it happened on any account, whatever the size.

@richvdh
Copy link
Member

richvdh commented Mar 1, 2024

This nasty bug happened during the development of the backup feature. The SDK no more recreates a new backup after entering the recovery key.

@manuroe was there an issue for this? Or can you link the PR that fixed it?

@manuroe
Copy link
Member

manuroe commented Mar 1, 2024

I do not think there is a SDK issue for it. The feature was in development and M tried it too early.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE Encryption O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Critical Prevents work, causes data loss and/or has no workaround S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue Z-Labs A defect in a feature that is behind a labs flag.
Projects
None yet
Development

No branches or pull requests

4 participants