kkapsner / keepassxc-mail

MailExtension to talk to keepassxc
GNU General Public License v3.0
60 stars 5 forks source link

KeePassXC - Update Entry dialog & issue with sending email #100

Open mickturn opened 1 month ago

mickturn commented 1 month ago

Description

Since last week, I have been having problems with the extension. It seems there is an issue with how Thunderbird handles credentials now, as they do not seem to be sent in a timely manner.

Expected Behaviour

The emails should be sent without issue, and the KeePassXC - Update Entry dialog box should not be triggered every time with Outlook accounts.

Current Behaviour

The extension triggers the KeePassXC - Update Entry dialog at Thunderbird launch, and then again at the time set to check for new emails, only for Outlook accounts.

image

If I wait too long, I get this:

image

Moreover, when I try to send emails, from any email provider, I get this error:

mailnews.smtp: Authentication failed: Socket closed. SmtpClient.sys.mjs:786:17
_onAuthFailed resource:///modules/SmtpClient.sys.mjs:786
_onClose resource:///modules/SmtpClient.sys.mjs:579
waitForPromise jar:file:///home/john/.thunderbird/e3yes66x.default/extensions/keepassxc-mail@kkapsner.de.xpi!/experiment/implementation.js:1237
waitForCredentials jar:file:///home/john/.thunderbird/e3yes66x.default/extensions/keepassxc-mail@kkapsner.de.xpi!/experiment/implementation.js:1247
getRefreshToken jar:file:///home/john/.thunderbird/e3yes66x.default/extensions/keepassxc-mail@kkapsner.de.xpi!/experiment/implementation.js:951
setRefreshToken jar:file:///home/john/.thunderbird/e3yes66x.default/extensions/keepassxc-mail@kkapsner.de.xpi!/experiment/implementation.js:966
alteredSetRefreshToken jar:file:///home/john/.thunderbird/e3yes66x.default/extensions/keepassxc-mail@kkapsner.de.xpi!/experiment/implementation.js:998
onPromptAuthAvailable resource:///modules/OAuth2Module.sys.mjs:238

Possible Solution

Restart Thunderbird each time.

Steps to Reproduce (for bugs)

  1. create a fresh Thunderbird profile
  2. install the extension
  3. setup KeePassXC
  4. add Outlook accounts
  5. try to send email from any email provider.

Context

This issue affected the way I can send emails with any email providers, as well as getting emails from Outlook. I did reproduce this issue with a fresh Thunderbird profile. I even tried to reinstall again and again Thunderbird and the extension…

Your Environment

mickturn commented 1 month ago

As an aside, there is another issue with the extension: it does not find the keepassxc-proxy when it is not located at /usr/bin/keepassxc-proxy. This means that when KeePassXC is installed from source or a snapshot build, etc, I have to manually create a symlink at /usr/bin/keepassxc-proxy, or the extension complains that it cannot find keepassxc-proxy.

The extension should provide a way to manually set the path to keepassxc-proxy, similar to how it is done in KeePassXC.

kkapsner commented 6 days ago

This update prompt for Outlook accounts is "normal" as Microsoft updates the oauth token every time... so the only way to get rid of this issue is to enable the updating without prompt in KeePassXC. This is not a popup from Thunderbird/keepassxc-mail.

For the sending issue I do not see the problem with my setup. Please give me the output of the extension console. Is there any popup from KeePassXC open?

The location of the proxy is set in ~/.mozilla/native-messaging-hosts/de.kkapsner.keepassxc_mail.json. If you change the path there you should not need to create a link.