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

Stuck on "Loading passwords..." with KeePass using KeePassNatMsg #11

Closed
Crazyphil opened this issue Mar 18, 2020 · 9 comments
Closed

Stuck on "Loading passwords..." with KeePass using KeePassNatMsg #11

Crazyphil opened this issue Mar 18, 2020 · 9 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Crazyphil
Copy link

I installed the KeePassXC-Mail add-on according to the instructions in the README. However, instead of KeePassXC, I'm using the original KeePass with the KeePassNatMsg plugin.

The add-on installs just fine and after clicking the "Connect with KeePassXC" button in the add-on settings, I get the usual dialog in KeePass to add the new client to the database. The add-on then shows its connection key in the settings. Thunderbird's error console doesn't show any errors as well:
error console

However, after I restart Thunderbird, a dialog prompting me for the password to the mail server appears. KeePassXC-Mail seems to start looking for the password, but never finishes. It instead keeps showing the message "Loading passwords.." until I enter it manually:
password prompt

I added the credentials quite some time ago to my KeePass database, with the URL smtp://<myserver>. This worked without any problems with the KeeBird add-on I used previously.

@kkapsner
Copy link
Owner

Unfortunately I'm not able to reproduce your problem. (I just do not get any entries from KeePassNatMsg - but I think that's either a problem on their side or a miss-configuration as I just hacked it together.)

What are your over all system details? OS? Thunderbird version? KeePass and KeePassNatMsg version?

PS: Why are you using KeePass anyway together with keepassxc-mail?

@Crazyphil
Copy link
Author

I'm using KeePass 2.44 with KeePassNatMsg 2.0.9 together with Thunderbird 68.6.0 and keepassxc-mail 0.1.2 on Windows 10 1903.

The mail server database entry has no special configuration, the title is the mail server hostname and the URL, as I mentioned before, is smtp://<myserver>. These are my KeePassNatMsg options:
General
Advanced

I know that my issue might be out of scope, so feel free to ignore it if it doesn't fit in the general project frame 😉 However, I've come a long way regarding auto-fill with KeePass. I originally used a Firefox/Thunderbird add-on that was killed by the switch to WebExtensions, and I was never really happy with how the Kee add-on handled login forms. Therefore, I switched to KeePassXC-Browser, because it's more or less an "official" add-on and there are good chances that it will get support in the future. Therefore, I also wanted to switch my Thunderbird add-on so I don't have to install two different KeePass plugins for auto-fill support and the mechanism is the same.
As to why I use KeePass instead of KeePassXC: it's just that I'm used to KeePass and I rely heavily on plugins.

@kkapsner
Copy link
Owner

Same versions here. Still not reproducible but the keepassxc-browser webExtension is not providing any credentials as well...

What is the content of your de.kkapsner.keepassxc_mail.json and where is is located?

@Crazyphil
Copy link
Author

When even KeePassXC-Browser doesn't work, there might be something wrong in your setup. If you want, I can prepare a portable KeePass with the plugins set up and/or a sample database for testing.

I saw that KeePassNatMsg uses a different directory than shown in the instructions, but I found the required JSON files in C:\Users\User\AppData\Local\KeePassNatMsg. I copied the kpnm_firefox.json file, named it kpnm_thunderbird.json and adapted it for Thunderbird. Here are the contents:

{
  "name": "de.kkapsner.keepassxc_mail",
  "description": "KeepassXC integration with Thunderbird with Native Messaging support",
  "path" : "keepassnatmsg-proxy.exe",
  "type": "stdio",
  "allowed_extensions": [
    "keepassxc-mail@kkapsner.de"
  ]
}

@Crazyphil Crazyphil changed the title Stuck on "Loading passwords..." Stuck on "Loading passwords..." with KeePass using KeePassNatMsg Mar 20, 2020
@kkapsner
Copy link
Owner

If you can provide a portable setup to reproduce your problem that would be great.

@Crazyphil
Copy link
Author

I've bundled a portable KeePass with the KeePassNatMsg plugin installed:
KeePass.zip

The archive contains a KeePass database called Database.kdbx (password is keepassxc-mail) where fake authentication data for the IMAP and SMTP server at Gmail are configured. The subdirectory Plugins/KeePassNatMsg also contains the native messaging proxy and the native messaging configuration file needed for connecting Thunderbird to KeePass. I also added a file called NativeMessaging.reg there that contains the registry key I used for enabling native messaging.

The second file contains a portable Thunderbird installation:
ThunderbirdPortable.zip (this one is too big to add to the GitHub issue)

It has the keepassxc-mail add-on readily installed and connected to the KeePass database, the mail account is configured to ask for the password at start-up. You should just have to start the program and get the password prompt with the "Loading passwords..." message immediately, given that the native messaging configuration is correct.

I hope this helps.

@kkapsner
Copy link
Owner

Thanks for the files. With these I can reproduce the issue. But it seems that the KeePassNatMsg simply does not respond to the "get-logins" request. Not sure how to debug this...

Also if I try to connect to this with keepassxc-browser I get a warning that an outdated version of keepassxc is used and that the communication could not be decrypted. Does this setting work for you with keepassxc-browser?

@Crazyphil
Copy link
Author

The warning regarding an old version of KeePassXC is "normal", because KeePassNatMsg seems to report a fixed KeePassXC version (2.4.3 right now), and KeePassXC has version 2.5.3 currently. This is nothing that ever prevented me from using KeePassXC-Browser in Firefox, but you can override the reported version in the KeePassNatMsg options on the Advanced tab with the KeePassXC Version Override setting.

Regarding your comment about KeePassXC-Browser, its now me unfortunately who cannot reproduce the issue. When I connect to the sample database with my usual Firefox setup, I can select the sample entries stored in the database for the KeePass Help Center just fine.

On topic: If you think that keepassxc-mail should do everything right, I can open an issue in the KeePassNatMsg repo and ask for supporting this add-on. However, as the KeePassXC-Browser plugin (currently using version 1.6.1) works for me, there has to be some difference between them. One possibility that comes to my mind is that I create the native messaging JSON file for keepassxc-mail manually, while it is managed by KeePassNatMsg for Firefox and other browsers. Maybe nobody ever thought that there would be another program using the native messaging mechanism and this somehow prevents communication?

@kkapsner
Copy link
Owner

Heureka! I got KeePassXC-Browser working (no idea was wrong yesterday). And then I compared the messages and found the difference: keepassxc-mail does not send the submitUrl paramenter (which is not necessary when using KeePassXC). When I send it I get entries from KeePassNatMsg..

So... I think that both KeePassNatMsg and keepassxc-mail do something not quite right. Since I can fix my side without any problems I will do that (you can have a look at the commit that fixes that issue - it's tiny!). It's up to you if you want to inform KeePassNatMsg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants