Closed Bug 1637690 Opened 4 years ago Closed 4 years ago

Initial decryption attempt after startup fails with "support for OpenPGP decryption is not available"

Categories

(MailNews Core :: Security: OpenPGP, defect, P1)

x86_64
Linux

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1636791

People

(Reporter: chriechers, Assigned: KaiE)

References

Details

Attachments

(2 files)

Attached image encrypted_message.png

Sending an openPGP PGP/MIME encrypted message using TB 68.8.0/Enigmail, and trying to decrypt that message with TB77 beta2.

Upon opening the received message in TB77 the first time this error is shown:
"This is an encrypted OpenPGP message, but support for OpenPGP decryption is not available."
A screenshot is attached.

from the Error Console:
Successfully loaded OpenPGP library librnp.so from /opt/thunderbird_beta/librnp.so RNPLib.jsm:46:13
public keys: 25, secret keys: 4 RNPLib.jsm:189:15
Error: "Cannot load required GPGME library"
loadExternalGPGMELib chrome://openpgp/content/modules/GPGMELib.jsm:55
init chrome://openpgp/content/modules/GPGMELib.jsm:61
once chrome://openpgp/content/modules/GPGME.jsm:20
init chrome://openpgp/content/modules/GPGME.jsm:36
init chrome://openpgp/content/BondOpenPGP.jsm:67
<anonymous> chrome://openpgp/content/BondOpenPGP.jsm:88
GPGME.jsm:28:15
Successfully loaded OTR library libotr.so.5 from /opt/thunderbird_beta/libotr.so.5 OTRLib.jsm:43:13

Upon opening the received message in TB77 the second time it actually gets decrypted.
A screenshot is attached.

The error console now shows:
in RNPLib.password_cb, context: decrypt RNPLib.jsm:246:15
max_len: 256 RNPLib.jsm:249:15
CryptoAPI.sync() starting interface.js:33:13
CryptoAPI.sync() leaving interface.js:55:13
Decrypted message
Good signature
Signature from public key **************** enigmailMsgHdrViewOverlay.js:189:15

The key id is redacted.

The message should decrypt right away upon first opening.

Attached image encrypted_message_2.png

Christian, thanks for testing the beta version. Comments below.

(In reply to Christian Riechers from comment #0)

"This is an encrypted OpenPGP message, but support for OpenPGP decryption is not available."
A screenshot is attached.

I've also seen that once. I haven't yet been able to reliably reproduce it.

Was that message already selected when you started Thunderbird, and it was the first message shown?
It seems like we have an initialization race.

Error: "Cannot load required GPGME library"

This is a harmless debugging output. The GPGME library is optional. In bug 1636791 we will add a preference, that will disable the library by default, so that only advanced users who have the required optional software can enable it.

Upon opening the received message in TB77 the second time it actually gets decrypted.

I'm glad to hear that it's working. Assuming the problem is really just a race on startup, it should continue to work for the remainder of your Thunderbird session.

The error console now shows:
in RNPLib.password_cb, context: decrypt RNPLib.jsm:246:15
max_len: 256 RNPLib.jsm:249:15
CryptoAPI.sync() starting interface.js:33:13
CryptoAPI.sync() leaving interface.js:55:13

More harmless debugging statements.

Decrypted message
Good signature
Signature from public key **************** enigmailMsgHdrViewOverlay.js:189:15

(In reply to Kai Engert (:KaiE:) from comment #2)

(In reply to Christian Riechers from comment #0)

"This is an encrypted OpenPGP message, but support for OpenPGP decryption is not available."

I've also seen that once. I haven't yet been able to reliably reproduce it.

I think I can consistently reproduce this here.

Was that message already selected when you started Thunderbird, and it was the first message shown?

I'm not sure what you mean with 'already selected'. The message is the first and only one in Inbox. I click it once to select it, and then double click to open it. If this is the first time opening it after starting Thunderbird I get the error.

Upon opening the received message in TB77 the second time it actually gets decrypted.

I'm glad to hear that it's working. Assuming the problem is really just a race on startup, it should continue to work for the remainder of your
Thunderbird session.

Yes, it does.

Component: Security → Security: OpenPGP
Priority: -- → P1
Product: Thunderbird → MailNews Core
Summary: openPGP error: support for OpenPGP decryption is not available. → Initial decryption attempt after startup fails with "support for OpenPGP decryption is not available"

(In reply to Christian Riechers from comment #3)

I'm not sure what you mean with 'already selected'. The message is the first and only one in Inbox. I click it once to select it, and then double click to open it. If this is the first time opening it after starting Thunderbird I get the error.

My question was "is the message shown immediately after startup" (somehow Thunderbird remembering that a message is automatically shown at startup), or, does this happen after you click a message.

You have confirmed it's the latter, you click a message after startup.

This surprises me, because it probably takes a moment for you to react, after the Thunderbird window appears. I would have assumed that our initialization could is executed more quickly than you are able to react and click the message.

Would you say your computer is very fast, or rather slow?

I have tried to reproduce it, by preparing my mouse exactly at the position where a message is about to appear, and use the keyboard and terminal to quit/start Thunderbird, so I can very quickly react after the window comes up, but I couldn't reproduce it yet.

Now I'm able to reproduce.

I open an encrypted message in a tab. Then I quit, and start again. Thunderbird still has the tab open, and shows the described error.
Switching to the main tab, then switching back to the other tab causes the message to be decrypted.

Assignee: nobody → kaie

I'm not rushing to open the message. No message pane. Message opens in a new window.

Using the nightly build 2020-05-15, I can no longer reproduce this issue.
Please comment if you see the problem again with this or a newer version.

I think the issue was fixed by bug 1636791.
Previously, we attempted to load the optional GPGME library, and if was missing, we raised an exception. That exception has probably interrupted the initial initialization code.

With the new logic, we no longer treat it as a failure if that optional library cannot be loaded, regardless of the setting of the pref.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE

Hi there. I know there are severl "versions" of this bug, but I am going to post my issue with it here.
I may have an idea how to reproduce the bug, at least for the TB version 78.5.0 on MacOS. Encryption worked all fine, also since the first version 78, where integrated PGP inside TB and Enigmail wasn't necessary anymore.

Then I installed the Add-On "p≡p" for Thunderbird: https://pep.software/thunderbird/. After I deactivated it, PGP didn't work anymore. Then I removed the Add-On, which also didn't resolve my issue. After that I reinstalled the Add-On and my TB App is broken, Enycrption doesn't work anymore. I don't see the "Manage PGP" entry under Tools. The whole integration seems to be gone.

Reinstalling TB also didn't resolve the issue.

I am kind of stuck. :(

Maybe it has something to do with this bug? Maybe someone can try to reproduce by following the steps I describted above?

Joshua, the original bug was resolved.

I think you are reporting a different issue, and it's better to file fresh bugs, rather than reuse old unrelated bugs.

If Thunderbird no longer works for you after installing that Add-on, maybe it has corrupted files in your Thunderbird profile.
You could try to start with a fresh profile, start thunderbird with command line parameter -P, or find a guide that explains how to use multiple profiles with thunderbird.

Hi there Kai and thanks for getting back to me. I found out, that after deactivating and/or deleting (?) the p≡p addon, I had to manually enable mail.openpgp.enable in the config editor. I will not file a new bug, but I think this should not happen when deactivating such an addon.

If an Add-on messes with Thunderbird's own preferences, there's nothing we can do. I think it's the responsibility of an Add-on to clean up.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: