Closed Bug 1643854 Opened 2 months ago Closed 2 months ago

"TypeError: can't access property "origins", oldPermissions is undefined" via migratePermissions on browser update (78 to 79)

Categories

(Toolkit :: Add-ons Manager, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox78 --- fixed
firefox79 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

Attachments

(1 file)

Themes don't have oldPermissions, so to fix this bug we need to change data.oldPermissions !== null to data.oldPermissions (to handle the case of oldPermissions being undefined).

STR:

  1. Download an old version of Firefox, e.g. 78.0a1 from a few days ago: https://ftp.mozilla.org/pub/firefox/nightly/2020/06/2020-06-01-09-38-12-mozilla-central/
  2. Download a new version of Firefox, e.g. 79.0a1 from today: https://ftp.mozilla.org/pub/firefox/nightly/2020/06/2020-06-05-04-39-26-mozilla-central/
  3. Create a new directory.
  4. Start and quit old Firefox: ./78/firefox/firefox --no-remote --profile profdirhere
  5. Start new Firefox: /79/firefox/firefox --no-remote --profile profdirhere
  6. Look at the global JS console.

Expected:

  • No error messages

Actual (log from 79.0a1 buildID 20200605043926 ):

1591389189879	addons.xpi	WARN	Exception running bootstrap method update on default-theme@mozilla.org: TypeError: can't access property "origins", oldPermissions is undefined(resource://gre/modules/Extension.jsm:730:7) JS Stack trace: intersectPermissions@Extension.jsm:730:7
migratePermissions@Extension.jsm:758:34
update@Extension.jsm:1675:27
callBootstrapMethod@XPIProvider.jsm:1819:33
_install@XPIProvider.jsm:1994:18
update@XPIProvider.jsm:2107:17
async*applyStartupChange@XPIDatabase.jsm:3407:67
processFileChanges@XPIDatabase.jsm:3307:14
checkForChanges@XPIProvider.jsm:2996:55
startup@XPIProvider.jsm:2456:12
callProvider@AddonManager.jsm:212:31
_startProvider@AddonManager.jsm:583:17
startup@AddonManager.jsm:807:14
startup@AddonManager.jsm:3462:26
observe@addonManager.js:87:29
1591389189879	addons.xpi	WARN	Exception running bootstrap method update on firefox-compact-light@mozilla.org: TypeError: can't access property "origins", oldPermissions is undefined(resource://gre/modules/Extension.jsm:730:7) JS Stack trace: intersectPermissions@Extension.jsm:730:7
migratePermissions@Extension.jsm:758:34
update@Extension.jsm:1675:27
callBootstrapMethod@XPIProvider.jsm:1819:33
_install@XPIProvider.jsm:1994:18
update@XPIProvider.jsm:2107:17
async*applyStartupChange@XPIDatabase.jsm:3407:67
processFileChanges@XPIDatabase.jsm:3307:14
checkForChanges@XPIProvider.jsm:2996:55
startup@XPIProvider.jsm:2456:12
callProvider@AddonManager.jsm:212:31
_startProvider@AddonManager.jsm:583:17
startup@AddonManager.jsm:807:14
startup@AddonManager.jsm:3462:26
observe@addonManager.js:87:29
1591389189879	addons.xpi	WARN	Exception running bootstrap method update on firefox-compact-dark@mozilla.org: TypeError: can't access property "origins", oldPermissions is undefined(resource://gre/modules/Extension.jsm:730:7) JS Stack trace: intersectPermissions@Extension.jsm:730:7
migratePermissions@Extension.jsm:758:34
update@Extension.jsm:1675:27
callBootstrapMethod@XPIProvider.jsm:1819:33
_install@XPIProvider.jsm:1994:18
update@XPIProvider.jsm:2107:17
async*applyStartupChange@XPIDatabase.jsm:3407:67
processFileChanges@XPIDatabase.jsm:3307:14
checkForChanges@XPIProvider.jsm:2996:55
startup@XPIProvider.jsm:2456:12
callProvider@AddonManager.jsm:212:31
_startProvider@AddonManager.jsm:583:17
startup@AddonManager.jsm:807:14
startup@AddonManager.jsm:3462:26
observe@addonManager.js:87:29
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/257a9126beb6
Avoid error on theme update r=mixedpuppy
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79

Comment on attachment 9154713 [details]
Bug 1643854 - Avoid error on theme update

Beta/Release Uplift Approval Request

  • User impact if declined: Error messages when the browser or non-extension addons (themes, langpacks, dictionaries, legacy addon) are updated.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small change, fully covered by unit tests.
  • String changes made/needed:
Attachment #9154713 - Flags: approval-mozilla-beta?

Comment on attachment 9154713 [details]
Bug 1643854 - Avoid error on theme update

approved for 78.0b5

Attachment #9154713 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.