"Inspect" background script doesn't work for "Firefox for Android" addons
Categories
(DevTools :: about:debugging, defect, P1)
Tracking
(firefox-esr91 unaffected, firefox-esr102 verified, firefox102 wontfix, firefox103 verified, firefox104 verified)
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox-esr102 | --- | verified |
firefox102 | --- | wontfix |
firefox103 | --- | verified |
firefox104 | --- | verified |
People
(Reporter: juraj.masiar, Assigned: jdescottes)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [geckoview?])
Attachments
(2 files)
15.95 KB,
image/png
|
Details | |
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
dmeehan
:
approval-mozilla-esr102+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
Steps to reproduce:
- start Android Studio emulator
- make sure Firefox Nightly is installed
- open any extension source folder (the extension should have a background script) and load it using:
web-ext run --target=firefox-android --android-device=emulator-5554 --firefox-apk=org.mozilla.fenix
- open desktop Firefox Nightly and connect to the extension from the
about:debugging
page - click the "Inspect" button for the background script of the addon
Actual results:
New tab is opened but it's blank - see the screenshot
Expected results:
Inspecting extension tabs works, also normal pages can be inspected, but not the background script of the addon.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Probably a regression from Bug 1753048.
It seems that the principal can be missing for some windows on Android at https://searchfox.org/mozilla-central/rev/f816e52d85cdaf0be7c9e1d2297f833e9ef53e2e/devtools/server/actors/watcher/browsing-context-helpers.jsm#53
At least I see the error popping up in the logs.
Assignee | ||
Comment 2•2 years ago
|
||
Confirmed regressed by 1753048.
On Android it seems we get a parent process window global with no documentPrincipal and no documentURI, which is unexpected.
Assignee | ||
Comment 3•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 5•2 years ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #2)
On Android it seems we get a parent process window global with no documentPrincipal and no documentURI, which is unexpected.
Irene will investigate whether this is expected on Android.
Comment 6•2 years ago
|
||
bugherder |
Assignee | ||
Comment 7•2 years ago
|
||
Comment on attachment 9284396 [details]
Bug 1777296 - [devtools] Bail out of getAddonIdForWindowGlobal for geckoview windowglobals missing principal
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Without this patch, developers cannot debug webextensions on Android. There is no workaround. Webextension developers will have to support and test on ESR102 until the next ESR, so we should really fix this.
- User impact if declined: Unable to debug webextensions on Android
- Fix Landed on Version: 104
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The patch is only adding a null check in one of our JS modules
Beta/Release Uplift Approval Request
- User impact if declined: Unable to debug webextensions on Android
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The patch is only adding a null check in one of our JS modules
- String changes made/needed:
- Is Android affected?: Yes
Comment 8•2 years ago
|
||
Comment on attachment 9284396 [details]
Bug 1777296 - [devtools] Bail out of getAddonIdForWindowGlobal for geckoview windowglobals missing principal
Approved for 103.0b7, thanks.
Comment 9•2 years ago
|
||
bugherder uplift |
Updated•2 years ago
|
Reporter | ||
Comment 10•2 years ago
|
||
Thanks for fixing it!
It works now with Nightly 104.0a1 (2022-07-10).
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
(In reply to juraj.masiar from comment #10)
Thanks for fixing it!
It works now with Nightly 104.0a1 (2022-07-10).
Thanks for testing!
Updated•2 years ago
|
Updated•2 years ago
|
Comment 12•2 years ago
|
||
bugherder uplift |
Comment 13•2 years ago
|
||
Comment on attachment 9284396 [details]
Bug 1777296 - [devtools] Bail out of getAddonIdForWindowGlobal for geckoview windowglobals missing principal
Approved for ESR102.1, thanks.
Comment 14•2 years ago
|
||
I've reproduced this issue using an affected Nightly build from 2022-06-29, with STR from comment 0.
The issue is verified as fixed on the latest fixed builds: Nightly 104.0a4, Beta 103.0b8 and ESR 102.1.
Updated•1 year ago
|
Description
•