Open Bug 1477155 Opened 6 years ago Updated 2 years ago

'Undo' doesn't synchronize with about:addons in a different window

Categories

(Toolkit :: Add-ons Manager, defect, P5)

defect

Tracking

()

People

(Reporter: hiro, Unassigned)

Details

1. Open about:addons in a two different window
2. Remove an extension in an about:addons
3. Undo the removed extension
4. See about:addons in the other window
Priority: -- → P5
Not sure if this is related but the mozAddonManager is not synchronized either. We are adopting mozAddonManager soon and there is an issue about that already: https://github.com/mozilla/addons-frontend/issues/5929.

STR:

1. Install an add-on from AMO (-dev)
2. Go to about:addons
3. Remove this add-on

On the add-on detail page of AMO -dev, the button will be in a "uninstalling" state. At this point, closing the about:addons page will fire the "uninstalled" event. The button on AMO -dev will display "Add to Firefox" (expected).

If we do NOT close the about:addons page, refreshing the page changes the add-on status: it becomes "disabled", although the add-on is enabled but inactive (isEnabled = true, isActive = false).

Assuming we do NOT close the about:addons page:

4. Undo the removed add-on in about:addons
5. Close about:addons

No event is fired.

Closing about:addons when the add-on is removed sends the "uninstalled" event.

Closing about:addons when the add-on is restored does not send any event, causing AMO -dev to not know the status of the add-on.

If that's not exactly related because mozAddonManager is not used on about:addons, let me know and I'll file a new bug to keep mozAddonManager synchronized.
Flags: needinfo?(aswan)
what information do you need?
Flags: needinfo?(aswan) → needinfo?(wdurand)
ah sorry, can you comment on my previous reply? Specifically, why are some events not fired? Is that a bug that could be fixed?
Flags: needinfo?(wdurand)
This is how the "Undo" feature in about:addons is implemented.
When the user presses the uninstall button, the extension is just disabled (since fully uninstalling it would wipe out storage etc and make "undo" not work as expected).  If the user clicks "undo" the extension is simply re-enabled.  The actual uninstall is completed when the user closes or navigates away from the about:addons page that is offering the "undo" option.

So, I think everything you describe in comment 1 is as expected.
I understand but there seems to be an issue when the add-on is restored. The mozAddonManager does not get notified of the status change.
(In reply to William Durand [:willdurand] from comment #5)
> I understand but there seems to be an issue when the add-on is restored. The
> mozAddonManager does not get notified of the status change.

When the user clicks "Undo", the event onOperationCancelled should fire (indicating that the uninstall has been canceled)
> When the user clicks "Undo", the event onOperationCancelled should fire (indicating that the uninstall has been canceled)

We do not listen to this event on AMO apparently. Thanks for your help, I'll see what I can do on the AMO side now.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.