Instant Messaging broken in Thunderbird 21 Beta, by an extension

RESOLVED FIXED in Thunderbird 24.0

Status

Thunderbird
Instant Messaging
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Sören Hentzschel, Assigned: florian)

Tracking

21 Branch
Thunderbird 24.0

Thunderbird Tracking Flags

(thunderbird24+ fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

4 years ago
Instant Messaging is broken in Thunderbird 21 Beta on OS X. The left sidebar is empty and nothing happens after connecting. Problem does not appear in Thunderbird 20 Beta, but in Thunderbird 21 Beta and higher (Earlybird, Daily). Thunderbird 21 Beta on Windows 8 works as expected.

In the error console there are a log of messages:

Fehler: null has no properties
Quelldatei: resource://gre/components/imContacts.js
Zeile: 1237

and:

Fehler: runnablePrompter:run: [Exception... "'[JavaScript Error: "incomingServer.wrappedJSObject.imAccount is null" {file: "resource://gre/modules/chatHandler.jsm" line: 50}]' when calling method: [nsIMsgAsyncPromptListener::onPromptStart]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/components/msgAsyncPrompter.js :: <TOP_LEVEL> :: line 26"  data: yes]

Quelldatei: resource://gre/components/msgAsyncPrompter.js
Zeile: 29
Is it possible that you used to have the Additional Chat Protocols for Thunderbird add-on in this profile?
(Reporter)

Comment 2

4 years ago
yes, it's disabled, but I used the Additional Chat Protocols for Thunderbird add-on with a previous version of Thunderbird in this profile.

Updated

4 years ago
Duplicate of this bug: 861627

Comment 4

4 years ago
chat should not be so fragile that an extension can leave not only chat, but all following folder account processing in a broken state.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Hardware: x86 → All

Updated

4 years ago
Summary: Instant Messaging broken in Thunderbird 21 Beta (OS X) → Instant Messaging broken in Thunderbird 21 Beta, by an extension
tracking-thunderbird23: --- → ?
(In reply to alta88 from comment #4)
> chat should not be so fragile that an extension can leave not only chat, but
> all following folder account processing in a broken state.

Unfortunately given that add-ons can pretty much do anything, it is entirely possible that an add-on can break our startup & folder account display.

However, in this situation, it does seem that we should be checking that value before hitting it.
tracking-thunderbird23: ? → +
(In reply to Mark Banner (:standard8) from comment #5)

> Unfortunately given that add-ons can pretty much do anything, it is entirely
> possible that an add-on can break our startup & folder account display.

Mark, this is not really the add-on breaking startup; things work fine when the add-on is there. The problem here is that things are broken once the add-on is uninstalled.

> However, in this situation, it does seem that we should be checking that
> value before hitting it.

We likely just need a null check or a try/catch somewhere.

I'm sure I tested and fixed this specific case last year, so this seems to me like a regression.
Can we add a test for this fix so we won't regress anymore ?

Comment 8

4 years ago
Another effect which may be related:
Troubleshooting Information is empty.
tracking-thunderbird23: + → ---
tracking-thunderbird24: --- → +
(In reply to Florian Quèze [:florian] [:flo] from comment #6)

> I'm sure I tested and fixed this specific case last year

I was referring to bug 736437.
Dagger looked into this yesterday in #maildev. The regression seems to be caused by http://hg.mozilla.org/comm-central/diff/ed456f650deb/chat/components/src/imAccounts.js from bug 842183 / https://bugzilla.instantbird.org/show_bug.cgi?id=1855

The likely fix is to move the gAccountsService._keepAccount(this); line to right after this.numericId = parseInt(... as the only dependency _keepAccount has is that aAccount.numericId is set.
Created attachment 759157 [details] [diff] [review]
Patch

Patch as described in comment 10.
Assignee: nobody → florian
Attachment #759157 - Flags: review?(clokep)
Comment on attachment 759157 [details] [diff] [review]
Patch

I forgot to mention: I haven't tested this at all! (yet)
Comment on attachment 759157 [details] [diff] [review]
Patch

This change looks OK, please test it before committing it!
Attachment #759157 - Flags: review?(clokep) → review+
Created attachment 766357 [details] [diff] [review]
Patch with test

Same patch, now with an xpcshell test.

I pushed this changeset to try and the new test passes: https://tbpl.mozilla.org/?tree=Thunderbird-Try&rev=1f8da1e733d9 (the rest isn't more broken than on the current Thunderbird-Trunk tree).
Attachment #759157 - Attachment is obsolete: true
Attachment #766357 - Flags: review?(clokep)
Attachment #766357 - Flags: review?(clokep) → review+
https://hg.mozilla.org/comm-central/rev/a98a8f1574d4
http://hg.instantbird.org/instantbird/rev/7b2e8be9f258
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 24.0
status-thunderbird24: --- → fixed
You need to log in before you can comment on or make changes to this bug.