Bug: Error dialog (cannot autosave) when composing message - I am using encryption but not for this message
Status: RESOLVED
Priority: --
Resolution: INVALID
Created: 2022-03-10 11:26:02+00:00
Resolved: 2022-03-10 14:14:32+00:00

Steps to reproduce:

Thunderbird version is 91.6.2 (64 de biți).
I am writing a simple message. 


Actual results:

While writing it, I get a modal dialog due to autosave failing to save the message. You have attached a screenshot and, below, a copy/paste from Thunderbird's browser console. I also inserted in the screenshot what the dropdown of the "Securitate" compose toolbar window button shows.

Error: failure in finishCryptoEncapsulation, exitCode: -1 mimeEncrypt.jsm:580:15
mailnews.send: Sending failed; , exitCode=2153185313, originalMsgURI=mailbox-message://[HIDDEN]@mail.[HIDDEN].com/Inbox#301 MessageSend.jsm:332:27
Error: configured sender key 0x207E493F38C96482 isn't accepted as a personal key RNP.jsm:2392:17
in getEncryptionFlags, gSendEncrypted=false, gSendSigned=false enigmailMsgComposeOverlay.js:1610:13
getCryptParams parameters: from=0x207E493F38C96482, to=, bcc=, hash=SHA256, flags=4802, ascii=0, errorObj= 
Object { value: "" }
 , logObj= 
Object {  }
encryption.jsm:73:13
getCryptParams, got: to=, bcc= encryption.jsm:113:13
getCryptParams returning: encryption.jsm:190:13
Object { sender: "0x207E493F38C96482", sign: false, signatureHash: "", sigTypeClear: false, sigTypeDetached: false, encrypt: true, encryptToSender: true, armor: true, senderKeyIsExternal: false, to: [], … }
encryption.jsm:191:13
CryptoAPI.sync() failed result:  Error: configured sender key 0x207E493F38C96482 isn't accepted as a personal key
    encryptAndOrSign chrome://openpgp/content/modules/RNP.jsm:2392
    encryptAndOrSign chrome://openpgp/content/modules/cryptoAPI/RNPCryptoAPI.jsm:323
    encryptMessageStart chrome://openpgp/content/modules/encryption.jsm:411
    finishCryptoEncapsulation chrome://openpgp/content/modules/mimeEncrypt.jsm:559
    createMessageFile resource:///modules/MimeMessage.jsm:86
    createAndSendMessage resource:///modules/MessageSend.jsm:129
    CompleteGenericSendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:4962
    GenericSendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:4898
    AutoSave chrome://messenger/content/messengercompose/MsgComposeCommands.js:9118
    setTimeout handler*AutoSave chrome://messenger/content/messengercompose/MsgComposeCommands.js:9122
    setTimeout handler*AutoSave chrome://messenger/content/messengercompose/MsgComposeCommands.js:9122
interface.js:46:17
sendFlags=000012c2 encryption.jsm:426:13
Error: failure in finishCryptoEncapsulation, exitCode: -1
    finishCryptoEncapsulation chrome://openpgp/content/modules/mimeEncrypt.jsm:580
    createMessageFile resource:///modules/MimeMessage.jsm:86
    createAndSendMessage resource:///modules/MessageSend.jsm:129
    CompleteGenericSendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:4962
    GenericSendMessage chrome://messenger/content/messengercompose/MsgComposeCommands.js:4898
    AutoSave chrome://messenger/content/messengercompose/MsgComposeCommands.js:9118
    setTimeout handler*AutoSave chrome://messenger/content/messengercompose/MsgComposeCommands.js:9122
    setTimeout handler*AutoSave chrome://messenger/content/messengercompose/MsgComposeCommands.js:9122
mimeEncrypt.jsm:597:15
mailnews.send: 
Exception { name: "NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS", message: "[JavaScript Error: \"failure in finishCryptoEncapsulation, exitCode: -1\" {file: \"chrome://openpgp/content/modules/mimeEncrypt.jsm\" line: 580}]'[JavaScript Error: \"failure in finishCryptoEncapsulation, exitCode: -1\" {file: \"chrome://openpgp/content/modules/mimeEncrypt.jsm\" line: 580}]' when calling method: [nsIMsgComposeSecure::finishCryptoEncapsulation]", result: 2153185313, filename: "resource:///modules/MimeMessage.jsm", lineNumber: 86, columnNumber: 0, data: XPCWrappedNative_NoHelper, stack: "createMessageFile@resource:///modules/MimeMessage.jsm:86:27\nasync*createAndSendMessage@resource:///modules/MessageSend.jsm:129:41\nCompleteGenericSendMessage@chrome://messenger/content/messengercompose/MsgComposeCommands.js:4962:23\nGenericSendMessage@chrome://messenger/content/messengercompose/MsgComposeCommands.js:4898:29\nAutoSave@chrome://messenger/content/messengercompose/MsgComposeCommands.js:9118:23\nsetTimeout handler*AutoSave@chrome://messenger/content/messengercompose/MsgComposeCommands.js:9122:22\nsetTimeout handler*AutoSave@chrome://messenger/content/messengercompose/MsgComposeCommands.js:9122:22\n", location: XPCWrappedNative_NoHelper }
MessageSend.jsm:131:27
mimeEncrypt.js: caught exception: Error
Message: 'failure in finishCryptoEncapsulation, exitCode: -1'
File:    chrome://openpgp/content/modules/mimeEncrypt.jsm
Line:    580
Stack:   finishCryptoEncapsulation@chrome://openpgp/content/modules/mimeEncrypt.jsm:580:15
createMessageFile@resource:///modules/MimeMessage.jsm:86:27
async*createAndSendMessage@resource:///modules/MessageSend.jsm:129:41
CompleteGenericSendMessage@chrome://messenger/content/messengercompose/MsgComposeCommands.js:4962:23
GenericSendMessage@chrome://messenger/content/messengercompose/MsgComposeCommands.js:4898:29
AutoSave@chrome://messenger/content/messengercompose/MsgComposeCommands.js:9118:23
setTimeout handler*AutoSave@chrome://messenger/content/messengercompose/MsgComposeCommands.js:9122:22
setTimeout handler*AutoSave@chrome://messenger/content/messengercompose/MsgComposeCommands.js:9122:22

Note: I do use email encryption that is offered by Thunderbird, configured for some of my accounts and only with specific "To" recipients. But this email was not written to be sent encrypted, but just plain email.


Expected results:

Autosave should save it correctly. No modal error dialogs should interrupt me typing the message.