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

When Nheko can't fetch secrets from KeePassXC, display option to retry #802

Closed
1 task done
maxigaz opened this issue Nov 11, 2021 · 6 comments
Closed
1 task done
Labels
enhancement New feature or request secrets-service Issues relating to the secret service support required by Nheko

Comments

@maxigaz
Copy link
Contributor

maxigaz commented Nov 11, 2021

The Problem

Secret Storage service is enabled in KeePassXC so that Nheko can store its secrets in it. Let's suppose that I have logged in with my Matrix account at least once and exit both Nheko and KeePassXC.

Later, if I run KeePassXC, unlock its database, and then launch Nheko, I'm automatically logged into my pervious Matrix session, so I don't have to authenticate the device again.

On the other hand, if KeePassXC is running but its database is locked when I launch Nheko, the following happens:

  1. KeePassXC prompts me to unlock the database.
  2. KeePassXC asks me if I want to move Nheko's entries into the recycle bin/trash one by one.
  3. Nheko has me create another session that has to be authenticated for E2E.

The Solution

When the KeePassXC database is locked, Nheko could display a message like "Secret storage for the pervious session is unreachable" with two options:

  • "Try again," which allows me to unlock the database and then clicking on this will restore the previous login session.
  • "Create new session," which does what the current behaviour is.

Alternatives

I know KWallet and Gnome Keyring can be used with Nheko, too, but I haven't tried them yet. (I'm using i3wm, so I would prefer using standalone applications that don't rely on full-fledged desktop environments.)

Additional context

I'm using Nheko 0.8.2-d11fcb0f and KeePassXC 2.6.6 under Manjaro Linux.

Happens in the latest version

  • Yes, this feature is still missing.
@maxigaz maxigaz added the enhancement New feature or request label Nov 11, 2021
@deepbluev7
Copy link
Member

Does Nheko not show an error, that it couldn't connect to the secret storage? Does it log any obvious error, that we could handle, or does KeePass just say "not found"?

@deepbluev7 deepbluev7 added the secrets-service Issues relating to the secret service support required by Nheko label Nov 11, 2021
@maxigaz
Copy link
Contributor Author

maxigaz commented Nov 12, 2021

Nheko shows the following message on the login screen:

Failed to restore OLM account. Please login again.

Here's the generated log when I run nheko --debug: nheko-e.log

@deepbluev7
Copy link
Member

This seems to be fixed in keepassxreboot/keepassxc#6943, which should be in KeePassXC 2.7, which isn't released yet. You could try the development version of it?

@maxigaz
Copy link
Contributor Author

maxigaz commented Nov 16, 2021

I've just tried it in a VM running Arch Linux. (I installed it from Chaotic AUR as keepassxc-git.)

I can confirm that it doesn't have the issue anymore. Now Nheko waits until I unlock the database and authorize Nheko inside KeePassXC. (I've also noticed that this last prompt window for authorization pops up every time, even if "Always" is checked, although this is probably a separate issue.)

Thank you for your help!

@cquike
Copy link

cquike commented Mar 22, 2022

Hi,
I also have this problem. I guess the KeePassXC issue mitigates the problem, but nheko still has a problem. I think it is a problem in nheko that if the libsecret service cannot be contacted, nheko looses any account configuration and cannot be restored.

@deepbluev7
Copy link
Member

No, Nheko only loses the account info, if the secret service CAN be contacted, but returns empty data instead of an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request secrets-service Issues relating to the secret service support required by Nheko
Projects
None yet
Development

No branches or pull requests

3 participants