Closed Bug 738487 Opened 8 years ago Closed 8 years ago

JS warning 'reference to undefined property server.spamSettings' after saving changes to settings of an IM account

Categories

(Thunderbird :: Instant Messaging, defect, trivial)

defect
Not set
trivial

Tracking

(thunderbird13 fixed)

RESOLVED FIXED
Thunderbird 14.0
Tracking Status
thunderbird13 --- fixed

People

(Reporter: aceman, Assigned: florian)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Just starting Thunderbird I get all these messages in the Error console:

Timestamp: 22.03.2012 23:27:21
Error: Attempting to set a null username to an imIncomingServer
Source File: file:///components/imIncomingServer.js
Line: 180

Timestamp: 22.03.2012 23:27:22
Warning: reference to undefined property MailServices.accounts.accounts
Source File: resource:///modules/mailInstrumentation.js
Line: 224

(should probably be only one .accounts?)

Timestamp: 22.03.2012 23:27:22
Warning: reference to undefined property am.accounts
Source File: chrome://messenger/content/accountUtils.js
Line: 130

Timestamp: 22.03.2012 23:27:22
Warning: reference to undefined property acctMgr.accounts
Source File: chrome://messenger/content/folderPane.js
Line: 1233

Timestamp: 22.03.2012 23:27:22
Warning: reference to undefined property accountManager.allServers
Source File: resource:///modules/MailUtils.js
Line: 72

Timestamp: 22.03.2012 23:27:23
Warning: reference to undefined property accountManager.allServers
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 1195

Timestamp: 22.03.2012 23:27:25
Warning: reference to undefined property mgr.accounts
Source File: chrome://messenger/content/mail3PaneWindowCommands.js
Line: 412

Timestamp: 22.03.2012 23:27:52
Warning: reference to undefined property mgr.accounts
Source File: chrome://messenger/content/mailTabs.js
Line: 496

Timestamp: 22.03.2012 23:27:57
Warning: reference to undefined property mgr.accounts
Source File: chrome://messenger/content/messengercompose/MsgComposeCommands.js
Line: 3240

Removing the IM account in the Account manager and restarting TB makes the warnings disappear.

Is this a problem of the 'JS test' type of IM account or a general problem of IM accounts?
Can you try with the patch from bug 738367 and maybe the patch from bug 736434 too and tell me if there are still warnings caused by the existence of the chat account?
Yes I will.
It looks very good now.

It seems only this one is left:
Timestamp: 23.03.2012 23:22:45
Warning: reference to undefined property server.spamSettings
Source File: chrome://messenger/content/AccountManager.js
Line: 543

It happens after changing any setting in the JS test account and OKing account manager.
Can I fix this with a currentServer.type != "im" check too?
Blocks: 739908
(In reply to :aceman from comment #4)
> Can I fix this with a currentServer.type != "im" check too?

Given that the spamSettings getter is implemented in http://mxr.mozilla.org/comm-central/source/mail/components/im/imIncomingServer.js#197, this doesn't seem like the right fix to me.
I'm not sure of why we have this warning, but if I wanted to fix it, I think the first thing I would try is to add a line like this in the object the getter returns:
QueryInterface: XPCOMUtils.generateQI([Ci.nsISpamSettings])
Ah, you can fix it on the IM server side? Then please do.
I didn't want to steal it from you ;).
Severity: normal → trivial
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: x86 → All
Summary: having 'JS test' IM account configured produces many warnings in the Error console, most of them problems with enumerating accounts. → JS warning 'reference to undefined property server.spamSettings' after saving changes to settings of an IM account
I didn't have it yet, so no problem :)
And the server side solution is better.
Found another warning caused by the IM backend:
JavaScript strict warning: chrome://messenger/content/mailWindowOverlay.js, line 1207: reference to undefined property currentServer.loginAtStartUp
Attached patch PatchSplinter Review
Yet another patch to remove some warnings caused by the imIncomingServer.js/imProtocolInfo.js implementations.
Assignee: nobody → florian
Attachment #610146 - Flags: review?(dbienvenu)
Comment on attachment 610146 [details] [diff] [review]
Patch

a comment as to why canLoginAtStartup should be false might be useful.
Attachment #610146 - Flags: review?(dbienvenu) → review+
http://hg.mozilla.org/comm-central/rev/a80766e8b581
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 14.0
Comment on attachment 610146 [details] [diff] [review]
Patch

[Approval Request Comment]
We took for aurora a similar patch in bug 738367 so maybe we should take this one too. I don't feel strongly about it.
Attachment #610146 - Flags: approval-comm-aurora?
Comment on attachment 610146 [details] [diff] [review]
Patch

Since this is extremely low risk, I think it's better to keep the repos in sync, for each of applying future patches, and consistency of testing.
Attachment #610146 - Flags: approval-comm-aurora? → approval-comm-aurora+
Note: this failed to apply to comm-aurora. Is it missing another patch or something?
You need to log in before you can comment on or make changes to this bug.