Closed Bug 1675346 Opened 4 years ago Closed 3 years ago

Thunderbird Mac "Cannot load required OTR library"

Categories

(Thunderbird :: Security, defect)

Unspecified
macOS
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: whatifmaybe, Unassigned, NeedInfo)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [regression 78.3.2 -> 78.3.3])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36

Steps to reproduce:

  1. Start Thunderbird 78.4 on macOS Catalina (10.15.7)
  2. Open Settings – Accounts and check whether OTR is available for the XMPP account or start a chat.

Actual results:

The tab for OTR settings is not available nor can OTR be used in any chats.
The error console states:

[Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIXPCComponents_Utils.readUTF8URI]" nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)" location: "JS frame :: resource://gre/modules/L10nRegistry.jsm :: L10nRegistry.loadSync :: line 658" data: no] 2 L10nRegistry.jsm:658:19
loadSync resource://gre/modules/L10nRegistry.jsm:658
fetchFile resource://gre/modules/L10nRegistry.jsm:573
generateResourceSetSync resource://gre/modules/L10nRegistry.jsm:478
map self-hosted:240
generateResourceSetSync resource://gre/modules/L10nRegistry.jsm:473
generateResourceSetsForLocaleSync resource://gre/modules/L10nRegistry.jsm:415
next self-hosted:1099
generateBundlesSync resource://gre/modules/L10nRegistry.jsm:177
next self-hosted:1099
touchNext resource://gre/modules/Localization.jsm:167
regenerateBundles resource://gre/modules/Localization.jsm:552
activate resource://gre/modules/Localization.jsm:243
<anonym> resource:///modules/OTRUI.jsm:10
connectedCallback chrome://messenger/content/chat/chat-conversation-info.js:117
<anonym> chrome://global/content/customElements.js:217

and

Error: Cannot load required OTR library
loadExternalOTRLib resource:///modules/OTRLib.jsm:75
init resource:///modules/OTRLib.jsm:81
once resource:///modules/OTR.jsm:100
init resource:///modules/OTR.jsm:121
init resource:///modules/OTRUI.jsm:246
init chrome://messenger/content/chat/chat-messenger.js:1632

OTR was working fine in e.g. Thunderbird 78.3 on the same system and can be restored by downgrading to version 78.3.

Expected results:

OTR settings as well as OTR capability should be available in Thunderbird.

Component: Untriaged → Account Manager
Component: Account Manager → Security
Keywords: regression
OS: Unspecified → macOS
Whiteboard: [regression 78.3 -> 78.4]

After some more testing, the OTR capability broke updating from Thunderbird 78.3.2 to Thunderbird 78.3.3 for macOS.

Whiteboard: [regression 78.3 -> 78.4] → [regression 78.3.2 -> 78.3.3]

Rob, can you think of any changes that could affect the OTR libraries between 78.3.2 and 78.3.3 ?

Has anyone else tried to reproduce/confirm this bug?

Rebuilding omni.ja of Thunderbird 78.3.3 without the changes introduced in https://hg.mozilla.org/releases/comm-esr78/rev/8b16b0b3809d0e9c4ad1fe5818cce5a7101754bf seems to fix the issue, i.e. I guess it's related to this change.

There is one notable difference comparing Thunderbird 78.3.3 to 78.3.2 – as of 78.3.3 the number of password prompts is reduced by 1 resulting in no OTR capability as a side effect.

Thanks for your analysis. I'll investigate how that change introduced this bug.

Assignee: nobody → kaie
Regressed by: 1662279
Flags: needinfo?(kaie)
Status: UNCONFIRMED → NEW
Ever confirmed: true

I cannot reproduce using 78.5.1 on macOS, two different OS versions.

Are you still able to reproduce?
Which macOS version are you using?

Flags: needinfo?(kaie) → needinfo?(whatifmaybe)

Are you using a master password?

I can still reproduce the bug with Thunderbird 78.5.1 and macOS 11.0.1.

Yes, master password is in place. There are three different IMAP accounts and one XMPP account in place.

As indicated above, making use of Thunderbird 78.3.2 results in three password prompts at start and OTR is working fine. With Thunderbird 78.3.3 and later, there are only two password prompts at start and OTR doesn't work.

Restarting Thunderbird with deactivated plugins doesn't help.

Flags: needinfo?(whatifmaybe)

Using an older MacBook Air, freshly updated to macOS 11.0.1, and 78.5.1, having IMAP and XMPP accounts and a master password, I still cannot reproduce this bug.

I'm currently trying to setup an environment which doesn't have any developer tools installed - maybe that makes a difference. Do you have Xcode installed?

I have a freshly installed macOS Catalina system, no developer tools, TB 78.5.1, MP, and I still cannot reproduce the bug.

I checked for any other changes that might impact the setup and came across "mail.openpgp.allow_external_gnupg" which is set to "true" as per https://wiki.mozilla.org/Thunderbird:OpenPGP:Smartcards in order to e.g. use a SmartCard.

Once this setting is set to "false" again, all is running fine.

Based on this, I guess it's a combination of Master Password and the external GPG capability being activated.

Please note that the external GPG capability and OTR did work in Thunderbird 78.3.2 and earlier versions.

Thanks. Which GnuPG distribution/packages for macOS did you install?

GnuPG for OSX (https://sourceforge.net/p/gpgosx/) as GPGTools (https://gpgtools.org/) seem to be not supported.

I've installed gpgosx, (regular, not arm).
I've used config editor to set allow_external_gnupg to true.
Restarted Thunderbird.

Still works fine for me.
Error console says it can load librnp, can load libotr, can load libgpgme.
OTR in chat works.

Thanks for the feedback.

Did you also reference any external GPG Keys in your email accounts?

Is there anything else I could do in order to further localise the issue?

(In reply to whatifmaybe from comment #16)

Did you also reference any external GPG Keys in your email accounts?

I didn't. But that shouldn't matter. That configuration isn't used until we try to sign a message, or encrypt a message to yourself (when you send a message)

Is there anything else I could do in order to further localise the issue?

I don't have good ideas at this time. You could try to follow instructions here:
https://wiki.mozilla.org/Thunderbird:OpenPGP#Debugging_.2F_Tracing

Ok bug résolu.

Flags: needinfo?(sphinxgl)

The OpenPGP debugging did not reveal any details. With changed logging level a few more details are added to the error console:

Error: Cannot load required OTR library
loadExternalOTRLib resource:///modules/OTRLib.jsm:75
init resource:///modules/OTRLib.jsm:81
once resource:///modules/OTR.jsm:100
init resource:///modules/OTR.jsm:121
init resource:///modules/OTRUI.jsm:246
init chrome://messenger/content/chat/chat-messenger.js:1651
openWindowPrompt resource://gre/modules/Prompter.jsm:1229
openPrompt resource://gre/modules/Prompter.jsm:1087
openPromptSync resource://gre/modules/Prompter.jsm:1070
nsIPrompt_promptPassword resource://gre/modules/Prompter.jsm:1559
promptPassword resource://gre/modules/Prompter.jsm:1291
decrypt resource://gre/modules/crypto-SDR.js:181
_decryptLogins resource://gre/modules/storage-json.js:779
findLogins resource://gre/modules/storage-json.js:638
findLogins resource://gre/modules/LoginManager.jsm:488
get password resource:///modules/imAccounts.jsm:607
imAccount resource:///modules/imAccounts.jsm:241
OTR.jsm:109:15

Aside from this, I created a fresh macOS installation and installed Thunderbird. It seems to fail the same way but I am not in the position to consistently reproduce this behaviour. One thing that seems to reliably trigger the situation is an up or downgrade of Thunderbird by replacing e.g. the Thunderbird 78.5.1 app with Thunderbird 78.6 and vice versa. The first start after replacement seems to trigger the condition again.

Just a quick update – the bug seems to be fixed in Thunderbird 85.0b1.

Marking WFM.

Assignee: kaie → nobody
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.