anytype-ts icon indicating copy to clipboard operation
anytype-ts copied to clipboard

Add Error Handling for keytarSet and keytarGet

Open hellodword opened this issue 1 year ago • 5 comments
trafficstars

Have you read a contributing guide?

  • [X] I have read CONTRIBUTING.md
  • [X] I have searched the existing issues and didn't find any that were similar
  • [X] I have considered creating a pull request with fixes instead of a bug report and want to proceed

Current Behavior

On Linux, anytype uses keytar/libsecret to call org.freedesktop.secrets dbus for reading and storing the mnemonic.

However, as far as I can see, there is no error handling in the code when calling WalletCreate and WalletRecover directly.

This might be the cause of this issue.

Expected Behavior

I am not sure whether we should prevent users from creating keys and entering Space if org.freedesktop.secrets dbus is unavailable, but I think there should at least be a notification.

Steps To Reproduce

  1. Remove or disable services like gnome-keyring on your computer, or ensure they require a password to use.

  2. Open anytype and create a key.

  3. You will proceed to the next step without any error notification, but the mnemonic will not be displayed, and it will not be saved successfully. Upon exiting, you will be unable to re-enter the wallet and will need to create it again.

Environment

- OS: NixOS
- Version: 0.41.1

Anything else?

No response

hellodword avatar Jul 04 '24 03:07 hellodword