GeckoView is not notifying back after allowing to update an extension that requires new permissions
Categories
(GeckoView :: Extensions, defect)
Tracking
(firefox75 fixed)
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: amejia, Assigned: bdahl)
Details
Attachments
(1 file)
Steps to reproduce
- Install an extension you could use UBlock 1.24.4 (The latest version at the moment is
1.25.0
) - Call webExtensionController.update(ublock)
- As the new version requires new permissions you will get a subsequent call to onUpdatePrompt, to indicate that we want to proceed with the update return
AllowOrDeny.ALLOW
Expected behaviour
When the update is completed we get a call on the GeckoResult<WebExtension>
of webExtensionController.update(ublock), indicating the status of the update.
Actual behaviour
We never get a callback on webExtensionController.update(ublock), as a result the consumer doesn't know in which state is the update.
Assignee | ||
Comment 1•5 years ago
|
||
Agi,
As mentioned in #gv-webext room, the update is hanging because it requires a browser restart to become active (bug 1279012). I'm thinking we can add onInstallPostponed
callback to the ExtensionInstallListener and reject the install with a new error code. Thoughts?
Comment 2•5 years ago
|
||
That sounds good. Either that or just returning null from update
(i.e. no update is present)
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
An extension with an onUpdateAvailable listener should delay automatic
updating of the extension until the app is restarted. Add support for this
state and reject the update result with a new install error code.
Reporter | ||
Comment 4•5 years ago
|
||
(In reply to Brendan Dahl [:bdahl] from comment #3)
Created attachment 9130625 [details]
Bug 1619710 - Handle postponed web extension updates in GeckoView. r=#geckoview-reviewersAn extension with an onUpdateAvailable listener should delay automatic
updating of the extension until the app is restarted. Add support for this
state and reject the update result with a new install error code.
Brendan just to clarify, the new behaviour will be the gecko result is going be rejected and we are going to get an error indicating the app needs to be restarted? If this is the new behaviour is looks like a bit drastic from the user perspective, that just updated an add-on. Is it possible to perform the update without the need of restarting?
Assignee | ||
Comment 5•5 years ago
|
||
That's correct, the promise will be rejected with WebExtension.InstallException.ErrorCodes.ERROR_POSTPONED
. I don't think we can change the behavior here though as it's how the extension expects it to work. This is how firefox and chrome desktop work as well. See bug 1279012.
Comment 7•5 years ago
|
||
bugherder |
Description
•