Closed Bug 1419042 Opened 2 years ago Closed 2 years ago

Uncaught exception when calling getCharPref for distribution.version in Preferences

Categories

(Firefox :: Preferences, defect, P1)

57 Branch
defect

Tracking

()

RESOLVED FIXED
Firefox 59
Tracking Status
firefox57 --- fixed
firefox58 --- fixed
firefox59 --- fixed

People

(Reporter: jaws, Assigned: jaws)

References

Details

Attachments

(1 file)

A user on Reddit reported that the preferences were not opening correctly for them[1].

They attached a screenshot (attached) that showed an error on line 379 of main.js (NS_ERROR_UNEXPECTED on nsIPrefBranch.getCharPref). Line 379 of main.js attempts to call nsIPrefBranch.getCharPref() without a fallback value[2].

[1] https://www.reddit.com/r/firefox/comments/7dfgnr/youve_earned_it_firefox/dpxo8qc/

[2] https://dxr.mozilla.org/mozilla-release/rev/3702966a64c80e17d01f613b0a464f92695524fc/browser/components/preferences/in-content/main.js#379
Priority: -- → P1
Comment on attachment 8930112 [details]
Bug 1419042 - Only use the distroVersion if the pref contains a value, otherwise leave it out of the version string.

https://reviewboard.mozilla.org/r/201284/#review206810

Looks good to me.
Thank you.
Attachment #8930112 - Flags: review?(evan) → review+
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/64ee916b6bb9
Only use the distroVersion if the pref contains a value, otherwise leave it out of the version string. r=evanxd
Backed out 1 changesets (bug 1419042) on request from jaws r=backout on a CLOSED TREE

Backout link: https://hg.mozilla.org/integration/autoland/rev/316b73a02f6c422295f6844517fbd7046d569338
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/67d04a3bf037
Only use the distroVersion if the pref contains a value, otherwise leave it out of the version string. r=evanxd
https://hg.mozilla.org/mozilla-central/rev/67d04a3bf037
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Comment on attachment 8930112 [details]
Bug 1419042 - Only use the distroVersion if the pref contains a value, otherwise leave it out of the version string.

Approval Request Comment
[Feature/Bug causing the regression]: The new preferences, first released in v56, added some version strings to the updates section. Some users, at least one user on Reddit, reported that preferences don't open when they installed v57. This was due to their `distribution.version` pref being missing. This user would have had the same problem if they opened the About window but that is less likely for most users compared to the Preferences. 
[User impact if declined]: potentially broken Preferences and About window
[Is this code covered by automated tests?]: no
[Has the fix been verified in Nightly?]: no
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: no
[Why is the change risky/not risky?]: This change adds a fallback default value for the `distribution.version` preference and will only use the value if it has been found, otherwise it will display the distribution ID without the associated version. This should be safe to uplift, and could ride along with a chemspill if one is needed due to other factors.
[String changes made/needed]:
Attachment #8930112 - Flags: approval-mozilla-release?
Attachment #8930112 - Flags: approval-mozilla-beta?
Comment on attachment 8930112 [details]
Bug 1419042 - Only use the distroVersion if the pref contains a value, otherwise leave it out of the version string.

Fix a potential broken preferences and about window issue. Beta58+.
Attachment #8930112 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment on attachment 8930112 [details]
Bug 1419042 - Only use the distroVersion if the pref contains a value, otherwise leave it out of the version string.

Not being able to open the preferences seems to be a pain, taking it in 57.0.1
Attachment #8930112 - Flags: approval-mozilla-release? → approval-mozilla-release+
Duplicate of this bug: 1390901
You need to log in before you can comment on or make changes to this bug.