Closed Bug 1451122 Opened 6 years ago Closed 6 years ago

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

Categories

(Firefox :: Enterprise Policies, defect)

61 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 61
Tracking Status
firefox60 + fixed
firefox61 --- verified

People

(Reporter: Abe_LV, Assigned: mkaply)

References

Details

Attachments

(1 file)

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.
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)
Flags: needinfo?(mozilla)
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+
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/d88676178e3e
Catch errors on uninstallable add-ons. r=Felipe
https://hg.mozilla.org/mozilla-central/rev/d88676178e3e
Status: NEW → RESOLVED
Closed: 6 years 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?
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.

Attachment

General

Created:
Updated:
Size: