Skip to content

Fixing "key storage out of sync" fails silently if 4S and local device both lack backup key #30435

@richvdh

Description

@richvdh

Steps to reproduce

STR are a bit convoluted, but empirically people have devices/accounts in this state, so:

  1. Via Element dev tools, set m.megolm_backup.v1 account data to {}
  2. Via browser dev tools, in matrix-js-sdk::matrix-sdk-crypto indexed db, in backup_keys store, delete recover_key_v1, then refresh.
    Alternatively, log in a new session, and verify with recovery key. (Either way, we end up with a device without the backup key.)
  3. Observe: Image
  4. Click "Enter recovery key"
  5. Enter recovery key

Outcome

What did you expect?

Some sort of error report

What happened instead?

Nil, back to step 3

The logs contain:

W DeviceListener: check_<...>: 4S is missing secrets {"crossSigningReady":true,"secretStorageReady":false,"allCrossSigningSecretsCached":true,"isCurrentDeviceTrusted":true,"defaultKeyId":"<...>"}
I Opening toast with key 'setupencryption': title 'Your key storage is out of sync.'
...

# After entering recovery key:
D SecurityManager: accessSecretStorage: bootstrapSecretStorage
I Not saving backup key to secret storage: no backup key

Metadata

Metadata

Assignees

Labels

A-E2EEA-E2EE-Key-BackupO-UncommonMost users are unlikely to come across this or unexpected workflowS-MinorImpairs non-critical functionality or suitable workarounds existT-DefectTeam: Crypto

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions