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

Handle "Could not access secret storage" error gracefully #8380

Open
hrb-hub opened this issue Jan 27, 2025 · 1 comment · May be fixed by #8471
Open

Handle "Could not access secret storage" error gracefully #8380

hrb-hub opened this issue Jan 27, 2025 · 1 comment · May be fixed by #8471
Assignees
Labels
desktop Desktop client related issues improvement nice-to-haves that are not impeding usage of any features

Comments

@hrb-hub
Copy link
Contributor

hrb-hub commented Jan 27, 2025

Key can get corrupted and can't be used anymore after that. Users can get stuck with a broken installation. Currently we can't distinguish temporary errors from persistent breakage. The easiest solution for now is just to give the user a choice when the error occurs.

AC

  • This should happen for both Credentials and Device Key
  • For desktop client: If you run to this error, show a prompt and let the user decide what to do.
    • Restart the application. (to just try again and check if it was a temporary error because of the user's setup)
    • Remove relevant local data (Credentials encrypt credentials, and Device Key encrypts: alarms, push data, encrypted preferences), and let the user enter credentials again.
    • Continue (in case the device key is broken and the user can log in)

Notes

Existing handling:

keyStoreFacade.getDeviceKey().catch(() => {
electron.dialog.showErrorBox("Could not access secret storage", "Please see the FAQ at tuta.com/faq/#secretstorage")
})

Estimated: 16h
Time spent: 8h

@hrb-hub hrb-hub added bug broken functionality, usability problems, unexpected errors desktop Desktop client related issues improvement nice-to-haves that are not impeding usage of any features and removed bug broken functionality, usability problems, unexpected errors labels Jan 27, 2025
@wrdhub wrdhub changed the title Handle "Could not access secret storage" error more gracefully Handle "Could not access secret storage" error gracefully Jan 27, 2025
@wrdhub
Copy link
Contributor

wrdhub commented Jan 27, 2025

Related: #7247

hrb-hub added a commit that referenced this issue Feb 5, 2025
Keys can get corrupted and become unusable, causing users to get stuck
with a broken installation.

Currently we can't distinguish temporary errors from persistent breakage.
The easiest solution for now is just to give the user a choice when
the error occurs.

Restart -> in case of a temporary error caused by user's setup.
Continue -> on the off-chance deviceKey is broken and user can log in.
Clear local data -> deletes config and invalidates keychain to allow
user to enter credentials again.

Close #8380

Co-authored-by: ivk <[email protected]>
@hrb-hub hrb-hub linked a pull request Feb 5, 2025 that will close this issue
hrb-hub added a commit that referenced this issue Feb 5, 2025
Keys can get corrupted and become unusable, causing users to get stuck
with a broken installation.

Currently we can't distinguish temporary errors from persistent breakage.
The easiest solution for now is just to give the user a choice when
the error occurs.

Restart -> in case of a temporary error caused by user's setup.
Continue -> on the off-chance deviceKey is broken and user can log in.
Clear local data -> deletes config and invalidates keychain to allow
user to enter credentials again.

Close #8380

Co-authored-by: ivk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop Desktop client related issues improvement nice-to-haves that are not impeding usage of any features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants