The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in Thunderbird 14.0

Status

Thunderbird
Instant Messaging
--
trivial
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: aceman, Assigned: florian)

Tracking

(Blocks: 1 bug)

Trunk
Thunderbird 14.0

Thunderbird Tracking Flags

(thunderbird13 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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?
(Assignee)

Comment 1

5 years ago
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?
(Reporter)

Comment 2

5 years ago
Yes I will.
(Reporter)

Comment 3

5 years ago
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.
(Reporter)

Comment 4

5 years ago
Can I fix this with a currentServer.type != "im" check too?
(Reporter)

Updated

5 years ago
Blocks: 739908
(Assignee)

Comment 5

5 years ago
(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])
(Reporter)

Comment 6

5 years ago
Ah, you can fix it on the IM server side? Then please do.
(Assignee)

Comment 7

5 years ago
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
(Reporter)

Comment 8

5 years ago
I didn't have it yet, so no problem :)
And the server side solution is better.
(Assignee)

Comment 9

5 years ago
Found another warning caused by the IM backend:
JavaScript strict warning: chrome://messenger/content/mailWindowOverlay.js, line 1207: reference to undefined property currentServer.loginAtStartUp
(Assignee)

Comment 10

5 years ago
Created attachment 610146 [details] [diff] [review]
Patch

Yet another patch to remove some warnings caused by the imIncomingServer.js/imProtocolInfo.js implementations.
Assignee: nobody → florian
Attachment #610146 - Flags: review?(dbienvenu)

Comment 11

5 years ago
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+
(Assignee)

Comment 12

5 years ago
http://hg.mozilla.org/comm-central/rev/a80766e8b581
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 14.0
(Assignee)

Comment 13

5 years ago
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 14

5 years ago
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?
That's because it had already landed:

http://hg.mozilla.org/releases/comm-aurora/rev/5d0a6ebdbd33
status-thunderbird13: --- → fixed
You need to log in before you can comment on or make changes to this bug.