Closed
Bug 1427255
Opened 7 years ago
Closed 7 years ago
WebExtension browserAction menu items randomly disappear
Categories
(WebExtensions :: Android, defect, P3)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 832990
People
(Reporter: ma1, Unassigned)
References
Details
[Steps to reproduce]:
1. Install any WebExtension using the browserAction API (e.g. NoScript, uBlock, ViewSource)
2.Use the browser and open the main menu from time to time, scrolling to the installed WebExtension
[Expected results]:
- The WebExtesions's browserAction menu item stays consistently in the main menu
[Actual results]:
- After a while the browserAction menu item is gone.
[Additional notes]:
- Could not find a reliable trigger yet, it may be memory pressure related (something gets garbage collected and shouldn't)?
- The WebExtension keeps working as usual, and the browserAction API appears to work even though the widget is not displayed (e.g. consequent setTitle() and getTitle() calls behave consistently)
- If multiple WebExtensions are installed, their menu items disappear all at once
- Each menu item reappears after disabling and re-enabling its WebExtension (the other ones are still missing)
Comment 1•7 years ago
|
||
Dupe of bug 1396270
Reporter | ||
Comment 2•7 years ago
|
||
Additional data point: debugging the WebExtension with WebIDE over USB shows it's fully functional, except for the menu item not being displayed.
Then issuing a browser.runtime.reload() from the remote console causes, maybe obviously, the menu item to appear.
Reporter | ||
Updated•7 years ago
|
Summary: WebExtension browssrAction menu items randomly disappear → WebExtension browserAction menu items randomly disappear
Comment 3•7 years ago
|
||
I started to look into this issue, unfortunately I have not been able to reproduce it yet.
The rendering of the browserActions on Android is being done on the Java side, in particular from the following code:
- The browserAction is added to the Android menu when a "Menu:AddBrowserAction" message is received by the BrowserApp class instance:
- https://searchfox.org/mozilla-central/rev/b24e6342d744c5a83fab5c15972e11eeb69d68e6/mobile/android/components/extensions/ext-browserAction.js#133
- https://searchfox.org/mozilla-central/rev/b24e6342d744c5a83fab5c15972e11eeb69d68e6/mobile/android/components/extensions/ext-browserAction.js#39
- https://searchfox.org/mozilla-central/rev/b24e6342d744c5a83fab5c15972e11eeb69d68e6/mobile/android/modules/BrowserActions.jsm#68-80
- https://searchfox.org/mozilla-central/rev/b24e6342d744c5a83fab5c15972e11eeb69d68e6/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java#1897-1907
- The registered browserAction are cached in mBrowserActionItemsCache ArrayList,
and the BrowserApp's onCreateOptionsMenu renders any cached browserAction here:
https://searchfox.org/mozilla-central/rev/b24e6342d744c5a83fab5c15972e11eeb69d68e6/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java#3428-3433
Updated•7 years ago
|
Flags: needinfo?(amckay)
Comment 4•7 years ago
|
||
Possibly see also bug 1396270 (which leads to bug 832990).
Flags: needinfo?(amckay)
Updated•7 years ago
|
Flags: needinfo?(amckay)
Comment 5•7 years ago
|
||
Dropping down from a P1, something we'd like to fix, but we don't have anyone on my time who knows how to do this. Bug 1396270, is pointing towards bug 832990 as well.
Comment 6•7 years ago
|
||
Based on the symptoms and comment 2 I'm quite certain that this is a duplicate of bug 832990.
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•