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

Disabling and recreating key backup on Web leaves the SDK (EX) in a weird state. #4190

Open
pixlwave opened this issue Oct 30, 2024 · 1 comment

Comments

@pixlwave
Copy link
Member

The SDK detects when the backup is disabled, when re-enabling it, it believes it is enabled until you try to send a message (or maybe receive one that needs to open the key backup?) at which point it believes the backup is disabled again. Choosing to enable the backup fails with

2024-10-30T12:38:16.481302Z ERROR elementx: Failed enabling secure backup with error: BackupExistsOnServer | SecureBackupController.swift:91 | spans: root
2024-10-30T12:38:16.482975Z ERROR elementx: Failed enabling key backup with error: failedEnablingBackup | SecureBackupScreenViewModel.swift:77 | spans: root⁦

Recording of 2 webs + an EX showing this and how it is handled differently.

Backup1080.mov
@pixlwave pixlwave changed the title Disabling and recreating key backup on Web leaves Rust (EX) in a weird state. Disabling and recreating key backup on Web leaves the SDK (EX) in a weird state. Oct 30, 2024
@poljar
Copy link
Contributor

poljar commented Nov 15, 2024

I think that at least one of the weird behavior here is caused by the fact that the backup key is never removed from the store:

// TODO: This should remove the old stored key and version.

That's why the SDK things the backup is active again after the restart.

I reproduced this and it can happen if there are multiple backups alive on the server as well. The SDK deletes the currently active one, the one the SDK uses itself, but after that one got deleted another one has become active.

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

2 participants