Uninstall extension does not work when system addons are added at the beginning of the list

VERIFIED FIXED in Firefox 60

Status

()

defect
VERIFIED FIXED
a year ago
a year ago

People

(Reporter: Abe_LV, Assigned: mkaply)

Tracking

61 Branch
Firefox 61
Points:
---

Firefox Tracking Flags

(firefox60+ fixed, firefox61 verified)

Details

Attachments

(1 attachment)

(Reporter)

Description

a year ago
Steps to reproduce:
Screen capture- https://testing-1.tinytake.com/sf/MjQ5MTY4NF83NTAxNDEy

1. Install extensions using this:
{
  "policies": {
    "Extensions": {
      "Install": [
        "https://addons.mozilla.org/firefox/downloads/file/895309/ublock_origin-1.15.18-an+fx.xpi",
        "https://addons.mozilla.org/firefox/downloads/file/808841/adblock_plus-3.0.2-an+fx.xpi"
      ]
    }
  }
}

2. Uninstall addons using this( Note: it has system add-ons at the beginning of the list):
{
  "policies": {
    "Extensions": {
      "Uninstall": [
        "activity-stream@mozilla.org",
        "screenshots@mozilla.org",
        "{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}",
        "uBlock0@raymondhill.net"
      ]
    }
  }
}

3. Check if the two extensions are uninstalled

Actual Result:
The extensions are not removed by the uninstall policy if the list contains non-removable addons (system add-ons) at the beginning of the list.
It works if the list gets reversed.

Expected result:
It should go through all the list of extensions and remove what it should.
(Reporter)

Updated

a year ago
Flags: needinfo?(felipc)
Summary: Uninstall extension does not seem to work when system addons are added at the beginning of the lists → Uninstall extension does not work when system addons are added at the beginning of the list
I imagine what's happening is that addon.uninstall() is throwing an error, so the list doesn't continue
Flags: needinfo?(felipc) → needinfo?(mozilla)
(Assignee)

Updated

a year ago
Flags: needinfo?(mozilla)
Comment hidden (mozreview-request)

Comment 3

a year ago
mozreview-review
Comment on attachment 8964702 [details]
Bug 1451122 - Catch errors on uninstallable add-ons.

https://reviewboard.mozilla.org/r/233414/#review238986
Attachment #8964702 - Flags: review?(felipc) → review+

Comment 4

a year ago
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/d88676178e3e
Catch errors on uninstallable add-ons. r=Felipe

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/d88676178e3e
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Assignee: nobody → mozilla
[Tracking Requested - why for this release]:
Enterprise Policies
Comment on attachment 8964702 [details]
Bug 1451122 - Catch errors on uninstallable add-ons.

Approval Request Comment
[Feature/Bug causing the regression]: Enterprise Policies
[User impact if declined]: kinda of a corner case, but if someone tries to uninstall a non-uninstallable extension, the function will throw instead of continuing to the next addon on the list
[Is this code covered by automated tests?]: no
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: QA has tested it
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: no
[Why is the change risky/not risky?]: just adds a try-catch around addon.uninstall()
[String changes made/needed]:
Attachment #8964702 - Flags: approval-mozilla-beta?
(Reporter)

Comment 8

a year ago
We tested this on the latest nightly and it is verified as fixed.
Test cases and runs are here- https://testrail.stage.mozaws.net/index.php?/plans/view/8760
Status: RESOLVED → VERIFIED
Comment on attachment 8964702 [details]
Bug 1451122 - Catch errors on uninstallable add-ons.

followup fix for enterprise policy, approved for 60.0b11
Attachment #8964702 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.