Open Bug 1909411 Opened 1 year ago Updated 1 year ago

browser.management.onUninstalled returns addon to be enabled

Categories

(WebExtensions :: General, defect, P5)

Firefox 119
defect

Tracking

(Not tracked)

People

(Reporter: buecher, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Steps to reproduce:

add listener:
browser.management.onUninstalled.addListener(fkt)
function fkt(ExtensionInfo) {.. some code ...}

fkt logs ExtensionInfo.enabled

then uninstall any addon. The listener is called, but ExtensionInfo.enabled is true.

Actual results:

there is a double message: the addon is uninstalled (this listener is invoked) AND the addon is enabled, according to ExtensionInfo.

The addon can't really be uninstalled and enabled at the same time.

Expected results:

Enabled should return false. This is what happens if the onDisabled listener is called.

Observed in TB addons in TB 119.

if this were set to enabled == false, then one could use a single listerner function for all four events: installed, uninstalled, enabled, disabled, if one just wants to monitor the enabled state.

Product: Core → WebExtensions
Severity: -- → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.