Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Improve handling of encryption key that is not available #7020

Closed
wants to merge 1 commit into from

Conversation

ReneHollander
Copy link

@ReneHollander ReneHollander commented Oct 23, 2021

I am trying to fix element-hq/element-desktop#688 and came up with the following: ReneHollander@a6caf94
This approach is less then ideal as there being no key in the Keyring (e.g the user reset the keyring) would lead to Element being stuck in an endless loading loop at startup without any indication what's going on (see [1]).

I am not too familiar with the codebase and I am wondering if a more experienced maintainer can give me a hint or two on how to implement this properly. I would have the following idea:

  • Start the app normally and display a banner that the encryption could not be loaded from the system keyring. Explain that it might need to be unlocked first.
  • Fix the message shown to the user to not be so confusing as it mentions no connection to the server could be made, even though just the keyring isn't unlocked: image
  • Have element try to poll for the encryption key and reload the app once it's available to regain connection and decrypt the messages and remove the banner.

Alternatively maybe on the intitial loading page [1] that would persist until the key is found add a message that it's waiting on the encryption key to be available. This might be easier to implement.

[1] Screen shown while trying to get the encryption key:
image


Here's what your changelog entry will look like:

🐛 Bug Fixes

If the Keyring is unavailable or not unlocked Element would start
without being able to decrypt messages. This fix will ensure Element
doesn't start unless it was able to retrieve the encryption key.

Unlocking the Keyring at a later time would not result in the messages
being decrypted. The app would need to be restarted to achieve this.

This fixes https://github.com/vector-im/element-web/issues/17845
@MadLittleMods MadLittleMods added Z-Community-PR Issue is solved by a community member's PR T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems labels Jun 1, 2022
@MadLittleMods
Copy link
Contributor

Related to #8272

@langleyd langleyd closed this Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Desktop app can not use keys in keyring after it is unlocked
3 participants