ElementR | Element R doesn't warn the user when the key backup has been deleted or reset from another session
The code is on MatrixChat.tsx in react sdk
cli.on(CryptoEvent.KeyBackupFailed, async (errcode): Promise<void> => {
let haveNewVersion: boolean | undefined;
let newVersionInfo: IKeyBackupInfo | null = null;
// if key backup is still enabled, there must be a new backup in place
if (cli.getKeyBackupEnabled()) {
haveNewVersion = true;
stack trace:
client.ts:3423 Uncaught (in promise) Error: End-to-end encryption disabled
at MatrixClient.getKeyBackupEnabled (client.ts:3423:19)
at MatrixClient.<anonymous> (MatrixChat.tsx:1677:21)
at MatrixClient.emit (events.js:153:1)
at MatrixClient.emit (typed-event-emitter.ts:89:22)
at RustCrypto.forSource (ReEmitter.ts:55:29)
at RustCrypto.emit (events.js:153:1)
Step to reproduce
- Register on web and setup recovery
- Send a few message from that session
- Login on another session
- From the other session, reset the backup
- From the first session, type
/discardsessionthen type a new message to trigger a key upload
Expected
Should show this popup
Actual
Nothing happens
@BillCarsonFr when is this codepath reached?
@BillCarsonFr when is this codepath reached?
It's emitted in the key backup upload loop, in case of M_WRONG_ROOM_KEYS_VERSION errors for example.
https://github.com/matrix-org/matrix-js-sdk/blob/2ef3ebb466ece630eba88ef29565d71a88efca08/src/rust-crypto/backup.ts#L371
Should make it consistent with element-x behavior (Please Confirm your recovery Key) when your local secrets are out of date. https://github.com/element-hq/element-meta/blob/develop/docs/crypto/backup.md#recovery-settings
Seems to have been duplicated by #29170. This one existed first, but the other has been linked in more places, so closing this one.