Closed Bug 1608296 Opened 6 years ago Closed 6 years ago

WebExtension$DelegateController is null intermittently

Categories

(GeckoView :: Extensions, defect, P1)

Unspecified
All
defect

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: csadilek, Assigned: agi)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [geckoview:m74])

Attachments

(1 file)

We see intermittent failures when clicking on browser actions. It seems the delegate controller is sometimes null causing the following crash:

java.lang.NullPointerException: Attempt to invoke interface method 'org.mozilla.geckoview.WebExtension$ActionDelegate org.mozilla.geckoview.WebExtension$DelegateController.getActionDelegate()' on a null object reference
    at org.mozilla.geckoview.WebExtension$Action.click(WebExtension.java:948)
    at mozilla.components.browser.engine.gecko.webextension.GeckoWebExtensionKt$toBrowserAction$onClick$1.invoke(GeckoWebExtension.kt:288)
    at mozilla.components.browser.engine.gecko.webextension.GeckoWebExtensionKt$toBrowserAction$onClick$1.invoke(Unknown Source:0)
    at mozilla.components.feature.toolbar.WebExtensionToolbarAction$createView$1.onClick(WebExtensionToolbarAction.kt:42)
    at android.view.View.performClick(View.java:7259)
    at android.view.View.performClickInternal(View.java:7236)
    at android.view.View.access$3600(View.java:801)
    at android.view.View$PerformClick.run(View.java:27892)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7356)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

This might be because the app is trying to call click on a BrowserAction that is for an extension that has been uninstalled, Christian do you think that could be the issue? In that case I'm not sure what we can do different. I can try throwing a different exception instead of a null pointer.

Flags: needinfo?(csadilek)

Not related to uninstall as we're removing all actions when the user uninstalls, but I found a reliable way to reproduce this in A-C's Sample Browser now.

  • Fresh install of sample browser (no tabs open)
  • Install uBlock (Settings -> Addons -> + etc.)
  • Restart the app
  • App starts with just one about:blank tab
  • Tap on uBlock browser action in toolbar
Flags: needinfo?(csadilek)
Component: General → Extensions
Assignee: nobody → agi
Status: NEW → ASSIGNED
Regressed by: 1600742
Has Regression Range: --- → yes
Keywords: regression
Priority: -- → P1
Whiteboard: [geckoview:m74]
Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/984ecd9e9bc8 Attach DelegateController to WebExtension created by ExtensionStore. r=snorp
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: