Closed Bug 1621503 Opened 2 years ago Closed 2 years ago

Extension in an inconsistent state after updating

Categories

(GeckoView :: Extensions, defect, P1)

Unspecified
All
defect

Tracking

(firefox75 verified, firefox76 verified)

VERIFIED FIXED
mozilla76
Tracking Status
firefox75 --- verified
firefox76 --- verified

People

(Reporter: amejiamarmol, Assigned: bdahl)

Details

(Whiteboard: [geckoview:m76])

Attachments

(2 files)

After updating uBlock origin from version 1.25.0 to 1.25.2, the add-on is in an inconsistent state, making it unresponsive. For more details see the Fenix related issue.

Steps to reproduce:

  1. Install uBlock version 1.25.0
  2. Request to update to version 1.25.2.

I believe the issue is related that we are not honouring the below contract with runtime.onUpdateAvailable. As uBlock is listening to runtime.onUpdateAvailable but doesn't call runtime.reload() , the add-on is getting into a weird inconsistent state, where even if the user restarts the app, the extension is not usable anymore until the add-on is disable and enable back where runtime.reload() is called.

<blockquote>

If the extension is not listening for this event when an update becomes available, the extension is reloaded immediately and the update is applied. If the extension is listening, then the update will be applied the next time the extension is reloaded. This happens if:

</blockquote>

Summary: Extension in a inconsistent state after updating → Extension in an inconsistent state after updating
Assignee: nobody → agi
Priority: -- → P1

Brendan is looking at this.

Assignee: agi → bdahl

The extension background page should be loaded when either an event needs
to be sent to it or after the browser has started up. When an extension
is updated the special startup event listeners do not appear to be built
yet and GeckoView was not sending browser started notification, which meant the
background page never being loaded.

Pushed by bdahl@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/765685adf961
Notify the extension system when GeckoView has started. r=geckoview-reviewers,agi
https://hg.mozilla.org/integration/autoland/rev/b25fbbe62520
Add update add-on menu item for GeckoView example. r=geckoview-reviewers,agi
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76

We're going to want to uplift this, but I'm not seeing a good way for QA to verify. Do you have any thoughts on how to verify this?

Flags: needinfo?(amejiamarmol)

there might be an easier way but:

Steps to verify^

Flags: needinfo?(amejiamarmol) → qe-verify?

Slightly updated steps:

  1. install old fennec nightly
  2. navigate to the 1.25.0 ublock link from AMO: https://addons.mozilla.org/firefox/downloads/file/3521827/ublock_origin-1.25.0-an+fx.xpi?src=dp-btn-primary
  3. update fennec to fenix (you can just update from the playstore)
  4. wait for fenix to update ublock
  5. kill and restart fenix
  6. check that ublock is still working, e.g. by navigating to a google page and accessing the popup (three dots -> ublock origin)

Comment on attachment 9133083 [details]
Bug 1621503 - Notify the extension system when GeckoView has started. r=#geckoview-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: Ublock could end up in a broken state after updating.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See https://bugzilla.mozilla.org/show_bug.cgi?id=1621503#c9
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Only sends a message to kickstart extension loading.
  • String changes made/needed:
Attachment #9133083 - Flags: approval-mozilla-beta?
Attachment #9133084 - Flags: approval-mozilla-beta?
Flags: qe-verify? → qe-verify+
QA Whiteboard: [qa-triaged]

Hi! I could reproduce this issue on a Nightly migration build from 3/8 with Pixel 2 (Android 9).
On the latest Nightly build 200317 GV 76 from 3/17, this issue is not reproducible with Pixel 2 (Android 9), following the steps from Comment 9.
Due to my findings, I will move this to Verified. Thanks!

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+

Comment on attachment 9133083 [details]
Bug 1621503 - Notify the extension system when GeckoView has started. r=#geckoview-reviewers

fix an issue with extension update on geckoview, approved for 75.0b5

Attachment #9133083 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9133084 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9133084 - Flags: approval-mozilla-beta+

Adding qe+ since the fix is in 75 now.

Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Hi! I could reproduce this issue on a Beta migration 74.0.0-beta.3 GV 74 from 3/4 with Pixel 2 (Android 9).
On the latest Beta build 75.0.0-beta.2 GV 75 from 3/25, this issue is not reproducible with Pixel 2 (Android 9), following the steps from Comment 9.
Due to my findings, I will move this to Verified. Thanks!

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.