Closed Bug 1043432 Opened 10 years ago Closed 9 years ago

AutoConfig Exception caused by toolkit.telemetry.prompted change

Categories

(Thunderbird :: Preferences, defect)

24 Branch
x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 842073

People

(Reporter: hartnegg, Unassigned)

Details

The interpretation of "toolkit.telemetry.prompted" must have been changed from version 24.6 to 24.7.

If there is a line
pref("toolkit.telemetry.prompted", true);
in the autoconfig file, Thunderbird 24.7 issues an error message that contains this:

[Exception... "Component returned failure code: 0x8000ffff 
(NS_ERROR_UNEXPECTED) [nsIPrefBranch.setBoolPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  
location: "JS frame :: prefcalls.js :: pref :: line 37"  data: no]

In Firefox this line in the config file was changed to
pref("toolkit.telemetry.prompted", 2);
Is this now also the case in Thunderbird?

This should not have changed within the 24.x series!
The same config file works in version 24.6, the error is only triggered in 24.7.

This is probably caused by different behaviour of the error handler, such that the code that you are pointing to cannot intercept it anymore.

Also I should add that the error message is not user-friendly at all. It should tell the full path of the config file, and which line there it does not like. Instead it tells the name of the source file, and the line number there.
Are you sure this wasn't an issue in previous versions?

The code [1] for this is specific to our comm-esr24 repo which shows zero changes between 24.6 and 24.7. So I really doubt that this is a new issue. As mentioned on tb-enterprise, I think this originally changed for esr 24, maybe even esr 17.

[1] http://mxr.mozilla.org/comm-esr24/search?string=kTelemetryPrompted&find=&findi=&filter=^[^\0]*%24&hitlimit=&tree=comm-esr24
[2] https://hg.mozilla.org/releases/comm-esr24/pushloghtml?fromchange=THUNDERBIRD_24_6_0_RELEASE&tochange=THUNDERBIRD_24_7_0_RELEASE
This has definitely changed from version 24.6 to 24.7.

One reliable way to trigger the error is having
pref("toolkit.telemetry.prompted", true);
in the autoconfig file.

The error is only shown in 24.7, not in 24.6
with the same config file.

There is a second case in which the error is shown,
and this is worse, because the admin can hardly
prevent it:
First users runs an old Thunderbird 24.x with autonfig that contains
pref("toolkit.telemetry.prompted", true);
Then Thunderbird is updated to 24.7. and autoconfig is updated to
pref("toolkit.telemetry.prompted", 2);

Thunderbird will show the error on the first run.

This does not happen when the profile is updated
from 24.6 to 24.7, only if it comes from an older version. 
I haven't tested intermediate versions, only 24.1.1,
but it must happen with some newer ones as well, I just do
not know how far one must go back to trigger this.

The reason appears to be that prefs.js in the profile contains
user_pref("toolkit.telemetry.prompted", true);

After the the user clicks OK in the error message, the
program runs normal, and it changes prefs.js to contain
user_pref("toolkit.telemetry.prompted", 2);
Future runs do not show the error.

Thunderbird contains code to catch this exception, but
somethow version 24.7 shows the error before that code
tries to prevent it.

Apparently we should have changed autoconfig earlier to 
pref("toolkit.telemetry.prompted", 2);
but when Firefox got this change, Thunderbird did not,
thus we left 'true' in that file for Thunderbird. 
Eventually Thunderbird also got the change, but this
was not announced, and it got the error handler to catch
the error, so we did not notice. Now the error handler
fails, and even if the autoconfig file is changed now,
the error is shown to some users at least one, when 
they have not used Thunderbird for a while.
Yes, the value should be automatically converted to 2 since TB24 (bug 842073). So if you all have TB24.x in the enterprise, make the admin set the value to 2 in the config file for everyone.

There seems to be no change to the functionality between TB24.6 and TB24.7. Not even TB31.
So I do not understand how it would only exhibit in TB24.7. I do not see anything relevant in Firefox 24.7 either.

I can test it soon, hopefully TB24.6 updates to 24.7 (and not 31) when I let it search updates.

For completeness, what is the "autoconfig" file? Does it maybe lock the prefs so that TB can't change the value?
Yes, the autoconfig file allows for the locking of prefs.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.