thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

Drafts can not be saved and mails can't be sent due to "error in Connection to encryption provider"

Open Linuspogo opened this issue 4 years ago • 2 comments

Describe the bug In some cases, K-9 will not allow me to store mails as drafts or even send them. An error message is displayed at the bottom about a "failed connection to the encryption service". I have openkeychain configured, but the mail is not encrypted and there is no key for the receiver.

Disabling the encryption services fixes the issue. It also works after I tap on the mail address in the receiver field, and then on the mail address again!

Note: the content of the mail is defined by a mailto: link.

Screenshots Screenshot_20211204-104239~2

Environment (please complete the following information):

  • K-9 Mail version: 5.905
  • Android version: 11
  • Device: OnePlus 8T
  • Account type: IMAP

Linuspogo avatar Dec 04 '21 09:12 Linuspogo

If a crypto provider is enabled drafts are encrypted by default. Your Android version probably suspends the OpenKeychain app when it wasn't used in a while, leading to the error when K-9 Mail is trying to connect to it to encrypt the draft.

Try exempting OpenKeychain from whatever power saving measures your OS is offering.

See also: https://forum.k9mail.app/t/how-do-i-make-k-9-mail-work-with-openkeychain-on-xiaomis-miui/82

cketti avatar Jan 09 '22 07:01 cketti

Yesterday, on K9 build 6,200, I had the same or a very similar problem.

I think that 1) battery saving options are not the source of the problem. I think that rather 2a) the cause is a semi-configured encryption setup.

My reason for believing 1 is as follows. So far as I can tell, OpenKeyChain is running as it should. ('So far as I can tell' because the affected device, which is an Asus Zenfone 8, running Android 12, seems to have non-standard battery-saving options.)

As to 2: I started to configure the encryption and then, being unable to discover what to do (partly because I could not find good instructions), I gave up.

LinuxOnTheDesktop avatar Jul 16 '22 13:07 LinuxOnTheDesktop

Every now and then I run into the same issue. Openkeychain is active and fully configured, k9 shows the error and claims i should 'click the lock symbol' to change encryption settings. However, there is no such symbol displayed in that mail! K9 version 6.400

coogor avatar Dec 21 '22 12:12 coogor

I think I know WHY THIS HAPPENS:

It is when k9mail is opened by another app.
E.g. when you click an email address on a website in a webbrowser app .

In this case the k9mail Android intends are "embedded" into the other app.
I'm not an Android developer. But I guess this makes OpenKeyChain think the other app (e.g. the webbrowser) tries to access the key, which it then denies.

 

See also:

  • #3420
  • https://github.com/thundernest/k-9/pull/1082

kolAflash avatar May 31 '23 18:05 kolAflash

I think I know WHY THIS HAPPENS:

It is when k9mail is opened by another app. E.g. when you click an email address on a website in a webbrowser app

this may happen, but is not a adequate requirement: I ran into this problem today again, openkeychain is open, and it asks me to click the lock symbol, which is not even there. version Screenshot_20230624_102950_K-9 Mail 6.602

coogor avatar Jun 24 '23 08:06 coogor

Noticed it happens basically every time when K9 is invoked from external, like a mailto-link on a website or another app (like sharing a picture taken with vflat) - so this confirms what kolAflash found out

coogor avatar Oct 21 '23 10:10 coogor

This should already be fixed in recent beta versions.

Duplicate of #6068

cketti avatar Oct 21 '23 12:10 cketti