Closed Bug 1703732 Opened 4 years ago Closed 4 years ago

Catch exception in `BackgroundUpdate.jsm:_mirrorToPerInstallationPref` when `BackgroundAppUpdate` policy locks `app.update.background.enabled`

Categories

(Toolkit :: Application Update, defect)

defect

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox87 --- unaffected
firefox88 --- unaffected
firefox89 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

The title says it all: BackgroundUpdate.jsm:_mirrorToPerInstallationPref doesn't catch exceptions from UpdateUtils.writeUpdateConfigSettting(...) when BackgroundAppUpdate policy has locked app.update.background.enabled.

Assignee: nobody → nalexander
Status: NEW → ASSIGNED

There are two parts to this. The first part is simply fixing the
issue, which was an oversight. The second part is rejecting with a
JavaScript Error, which provides a nicely formatted stack in the
browser console, easing debugging.

Set release status flags based on info from the regressing bug 1689519

Pushed by nalexander@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dcd8281b5f22 Catch exception if `BackgroundAppUpdate` policy has locked `app.update.background.enabled`. r=bytesized,application-update-reviewers
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

Confirming that the issues are fixed on Windows 10x64 with 89.0a1 (2021-04-09).
Issues are still reproducible on Windows 7x64 with 89.0a1 (2021-04-09).

Windows7x64 logs from browser console:

  • ignoring failure to mirror per-profile pref "app.update.background.scheduling.enabled" default to per-installation pref default "app.update.background.enabled" Error: UpdateUtils.writeUpdateConfigSetting: Unable to change value of setting 'app.update.background.enabled' because it is locked by policy
    writeUpdateConfigSetting resource://gre/modules/UpdateUtils.jsm:393
    _mirrorToPerInstallationPref resource://gre/modules/BackgroundUpdate.jsm:278
    maybeScheduleBackgroundUpdateTask resource://gre/modules/BackgroundUpdate.jsm:331
    task resource:///modules/BrowserGlue.jsm:2540
    _scheduleStartupIdleTasks resource:///modules/BrowserGlue.jsm:2572

  • BackgroundUpdate: maybeScheduleBackgroundUpdateTask: not scheduling background update: '["app.update.background.enabled=false"]' BackgroundUpdate.jsm:430
    BackgroundUpdate: maybeScheduleBackgroundUpdateTask: exiting after uncaught exception in maybeScheduleBackgroundUpdateTask!
    Exception { name: "NS_ERROR_FAILURE", message: "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWinTaskSchedulerService.deleteTask]", result: 2147500037, filename: "resource://gre/modules/TaskSchedulerWinImpl.jsm", lineNumber: 57, columnNumber: 0, data: null, stack: "deletetask@resource://gre/modules/taskschedulerwinimpl.jsm:57:16\ndeletetask:437:31\n", location: XPCWrappedNative_NoHelper }

Flags: needinfo?(nalexander)
Regressions: 1709240
Has Regression Range: --- → yes
Flags: needinfo?(nalexander)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: