Closed Bug 861454 Opened 11 years ago Closed 11 years ago

Instant Messaging broken in Thunderbird 21 Beta, by an extension

Categories

(Thunderbird :: Instant Messaging, defect)

21 Branch
defect
Not set
normal

Tracking

(thunderbird24+ fixed)

RESOLVED FIXED
Thunderbird 24.0
Tracking Status
thunderbird24 + fixed

People

(Reporter: soeren.hentzschel, Assigned: florian)

References

Details

Attachments

(1 file, 1 obsolete file)

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?
yes, it's disabled, but I used the Additional Chat Protocols for Thunderbird add-on with a previous version of Thunderbird in this profile.
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
Summary: Instant Messaging broken in Thunderbird 21 Beta (OS X) → Instant Messaging broken in Thunderbird 21 Beta, by an extension
(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.
(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 ?
Another effect which may be related:
Troubleshooting Information is empty.
(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.
Attached patch Patch (obsolete) — Splinter Review
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+
Attached patch Patch with testSplinter Review
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
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 24.0
You need to log in before you can comment on or make changes to this bug.