Closed Bug 1530712 Opened 6 years ago Closed 6 years ago

Make sure extensions installed via policy are enabled

Categories

(Firefox :: Enterprise Policies, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
Firefox 67
Tracking Status
firefox-esr60 --- verified

People

(Reporter: mkaply, Assigned: mkaply)

Details

Attachments

(1 file)

Customer is reporting that extensions installed via policy are disabled.

While I can't recreate except in one case, we don't have code that does this explicitly and we should.

  1. The customer problem was unrelated. They were installing as a third party.

  2. This did expose an ESR only bug - if a user disabled an addon then after install, it stays disabled. This isn't happening on nightly.

Comment on attachment 9046835 [details]
Bug 1530712 - Enable addon after installation via policy.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is an ESR only patch to solve a case where if a policy installed an extension, and that extension had already been installed and disabled by the user, it wouldn't get reinstalled.

This is not an issue on current builds because of https://bugzilla.mozilla.org/show_bug.cgi?id=1313298.

Testing this is pretty straightforward. Install an addon via policy, disable it. Then clear the runOnce preference in about:config. Restart the browser. The addon should enable (before it was disabled)

  • User impact if declined: The extension stays disabled if installed via policy. We've had this reported by enterprises.
  • Fix Landed on Version: N/A
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Adds one line to just enable the addon after the install.
  • String or UUID changes made by this patch:
Attachment #9046835 - Flags: approval-mozilla-esr60?
Flags: qe-verify+
QA Contact: emil.ghitta

Comment on attachment 9046835 [details]
Bug 1530712 - Enable addon after installation via policy.

Fixes an ESR-only Policy Engine bug. Approved for 60.6esr.

Attachment #9046835 - Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67

Backed out 74838 (Bug 1530712) for failing browser_policy_extensions.js: https://hg.mozilla.org/releases/mozilla-esr60/rev/c482211135add40e640a1fff602f073d792c36fa

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-esr60&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel%2Crunnable&group_state=expanded&revision=5d579fb748388fbbf101efd1e31d3460514e25e7
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=231645281&repo=mozilla-esr60

[task 2019-03-04T14:49:54.623Z] 14:49:54 INFO - TEST-PASS | browser/components/enterprisepolicies/tests/browser/browser_policy_extensions.js | Engine is inactive at the start of the test -
[task 2019-03-04T14:49:54.624Z] 14:49:54 INFO - Leaving test bound policies_headjs_startWithCleanSlate
[task 2019-03-04T14:49:54.626Z] 14:49:54 INFO - Entering test bound test_addon_install
[task 2019-03-04T14:49:54.628Z] 14:49:54 INFO - TEST-PASS | browser/components/enterprisepolicies/tests/browser/browser_policy_extensions.js | Sanity check the temporary file doesn't exist. - true == true -
[task 2019-03-04T14:49:54.629Z] 14:49:54 INFO - Console message: [JavaScript Error: "TypeError: install.addon is null" {file: "resource:///modules/policies/Policies.jsm" line: 568}]
[task 2019-03-04T14:49:54.630Z] 14:49:54 INFO - Buffered messages logged at 14:49:54
[task 2019-03-04T14:49:54.631Z] 14:49:54 INFO - TEST-PASS | browser/components/enterprisepolicies/tests/browser/browser_policy_extensions.js | Addon not installed. -
[task 2019-03-04T14:49:54.632Z] 14:49:54 INFO - TEST-PASS | browser/components/enterprisepolicies/tests/browser/browser_policy_extensions.js | Addon version is correct -
[task 2019-03-04T14:49:54.634Z] 14:49:54 INFO - Buffered messages finished
[task 2019-03-04T14:49:54.635Z] 14:49:54 INFO - TEST-UNEXPECTED-FAIL | browser/components/enterprisepolicies/tests/browser/browser_policy_extensions.js | A promise chain failed to handle a rejection: install.addon is null - stack: onBeforeUIStartup/</<@resource:///modules/policies/Policies.jsm:568:15
[task 2019-03-04T14:49:54.636Z] 14:49:54 INFO - Rejection date: Mon Mar 04 2019 14:49:53 GMT+0000 (UTC) - false == true - JS frame :: resource://testing-common/PromiseTestUtils.jsm :: assertNoUncaughtRejections :: line 257
[task 2019-03-04T14:49:54.637Z] 14:49:54 INFO - Stack trace:
[task 2019-03-04T14:49:54.638Z] 14:49:54 INFO - resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:257
[task 2019-03-04T14:49:54.638Z] 14:49:54 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1089
[task 2019-03-04T14:49:54.639Z] 14:49:54 INFO - Tester_execTest@chrome://mochikit/content/browser-test.js:1058:9
[task 2019-03-04T14:49:54.640Z] 14:49:54 INFO - Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:958:9
[task 2019-03-04T14:49:54.641Z] 14:49:54 INFO - SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:795:59

Status: RESOLVED → REOPENED
Flags: needinfo?(mozilla)
Resolution: FIXED → ---

Aryx:

Here is an updated patch.

https://phabricator.services.mozilla.com/D21266

It passes the tests and worked for me locally.

Sorry for the first one.

Flags: needinfo?(mozilla) → needinfo?(aryx.bugmail)
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Flags: needinfo?(aryx.bugmail)
Resolution: --- → FIXED
QA Whiteboard: [qa-triaged]

Hi Mike! Do you have any news regarding the esr try build? The build provided in comment 8 is busted.

Flags: needinfo?(mozilla)

Can you test with a recent ESR build? E.g. https://treeherder.mozilla.org/#/jobs?repo=mozilla-esr60&resultStatus=success%2Cpending%2Crunning%2Ctestfailed%2Cbusted%2Cexception&revision=e748e6465ecbcf7ceac1e3af2e37a6f1eb7bb86d&searchStr=build&selectedJob=233065827

  1. Click on an "N" for a Nightly build.
  2. At the bottom, click on "Job Details".
  3. Find the program link. In case of Windows "target.installer.exe" and download it.
  4. Install it.
    Let me know if this doesn't help.
Flags: needinfo?(mozilla)

Thanks Sebastian!

I have managed to reproduce this issue using Firefox 60.5.2esr (BuildId:20190221164337).

This issue is verified fixed using Firefox 60.5.3esr (provided in comment 11) on Windows 10 64bit, macOS 10.11.6 and Ubuntu 16.04 64bit.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: