Closed Bug 1279472 Opened 5 years ago Closed 4 years ago
[disco pane] moz
Addon Manager .get Addon By ID is not aware of installing/uninstalling pending a restart
See these two related issues on the new disco pane for full STR. https://github.com/mozilla/addons-frontend/issues/580 https://github.com/mozilla/addons-frontend/issues/579 In a nutshell, if a install is underway and requires a restart getAddonByID doesn't return anything. This means we assume the Add-on is uninstalled. Similarly if an add-on is uninstalling and requires a restart getAddonByID returns the add-on but doesn't provide the needsRestart hint. Again this leads to us making it look like the add-on is installed, when in fact it's pending removal. In both cases About:addons#Extensions reflects the state correctly so it must be using some other means to know that the restart is pending in each case. To fix this could we update getAddonByID to always return when the add-on is installing pending a restart, and to return the needsRestart hint when the add-on is uninstalling pending a restart?
For both cases perhaps mozAddonManager.getAddonByID could look at getAddonsWithOperationsByTypes()  and still return the addon if the addon we're trying to introspect is in that list. Additionally prescence in that list could also fill in the needsRestart hint.  https://developer.mozilla.org/en-US/Add-ons/Add-on_Manager/AddonManager#getAddonsWithOperationsByTypes()
We've had no shortage of other issues with addons that require a restart, but at this point I think we've agreed to just punt on all of them and take care to only use extensions that we are certain will be restartless on the disco pane. Please reopen if I've overlooked something...
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.