I get "Sending of the message failed" upon trying to send encrypted mail, but only to this one contact of mine. With other contacts it seems to work. Sending PGP to this contact has worked before for a long time. I'm unsure what change causes the bug as I haven't updated Thunderbird, gpg4win/GnuPG, Enigmail, my key or their key in the meantime, neither have I changed substantial settings or installed new TB addons.
The error console indicates it has to do with Enigmail:
subprocess.jsm: subprocess.jsm:
message: File closed
fileName: resource://enigmail/enigmailprocess_worker_win.js
lineNumber: 87
column: undefined
stack: close@resource://enigmail/enigmailprocess_worker_win.js:87:19
onError@resource://enigmail/enigmailprocess_worker_win.js:115:5
onReady@resource://enigmail/enigmailprocess_worker_win.js:304:7
poll@resource://enigmail/enigmailprocess_worker_win.js:731:11
loop@resource://enigmail/enigmailprocess_worker_win.js:713:5
errorCode: 4286185473
(unknown)mimeEncrypt.js: caught exception: undefined
Message: 'undefined'
File: undefined
Line: undefined
Stack: undefined
(unknown)uncaught exception: 2147500037
(unknown)uncaught exception: subprocess.jsm: caught error:
message: File closed
fileName: resource://enigmail/enigmailprocess_worker_win.js
lineNumber: 87
column: undefined
stack: close@resource://enigmail/enigmailprocess_worker_win.js:87:19
onError@resource://enigmail/enigmailprocess_worker_win.js:115:5
onReady@resource://enigmail/enigmailprocess_worker_win.js:304:7
poll@resource://enigmail/enigmailprocess_worker_win.js:731:11
loop@resource://enigmail/enigmailprocess_worker_win.js:713:5
errorCode: 4286185473
nsPrompter.js:364:5
Any ideas?
Edit to add: The issue persists after updating to the latest gpg4win.
Diff:
Try rebooting. The upgrade function in gpg4win contains an error, that gets self-healed after a reboot.
Just tried rebooting. Same outcome, same error messages. May I add, the error started to occur before I upgraded gpg4win, or facilitated any changes.
A few minutes after the error, I also get the following in the console:
Ok, I tried to do the encryption and signing in GPA and get an error there as well. It refers to the GPGME library, so it may have nothing to to with Enigmail.
I recommend you uninstall gpg4win entirely, reboot, and then re-install it with all components.
Never mind, mystery solved. The contact's encryption subkey was expired, and all GPGME says about that is "Unusable public key" (unexpected error at gpafileencryptpop.c:779). It's quite a pity that GPGME gives no useful info as to what the problem is. However, if this is unique to line 779, at least Enigmail could inform the user that the encryption key is expired so they won't be left in the dark. (It could even try to retrieve a newer verison of the key and see if it can encrypt to that).
Enigmail does regularly try to update keys from public servers (like once a week). And it usually would not let you encrypt to a key with no valid encryption subkey.
My guess is that the subkey expired sometime today. Expiry is by seconds, but Enigmail would only compare dates...
Well, it didn't, but neither did it let me know that it was expired and that's the problem. I'm not saying this is necessarily Eniglmail's mistake, as it's GPGME screwing up in the background and not reporting properly, just an observation on how it all manifests to the user.
Still, if there's an exception thrown, it would be beneficial if Enigmail would try to update that one key, just in case, and if it fails, then let the user know that it's outdated and a manual check is required.
By the way, the subkey expired more than a month ago and the replacement was available on the key servers about 3 weeks ago. A weekly check should have caught that.
Is there any way (eg. a setting) I can make sure Enigmail performs these checks?