match_about_blank addon doesn't load in about:blank from window.open()
Categories
(WebExtensions :: General, defect, P3)
Tracking
(firefox127 affected, firefox128 affected, firefox129 affected)
People
(Reporter: firefox, Unassigned)
References
Details
Attachments
(3 files)
Steps to reproduce:
- Save the attached files to disk
- Open about:debugging#/runtime/this-firefox
- Load temporary addon match_about_blank bug
- Open the attached HTML file index.html
- Press the window.open() button
- Open the web inspector Console
Actual results:
The extension content script doesn't inject in the page, and there's no log message from the extension.
Expected results:
Log message from the extension: "extension script top? true about:blank"
The extension content script does inject if you reload the page, or if you just load about:blank in a new tab.
This bug does not occur in Google Chrome.
Reporter | ||
Comment 1•5 months ago
|
||
Reporter | ||
Comment 2•5 months ago
|
||
Reporter | ||
Comment 3•5 months ago
|
||
Also, the document.readyState is "uninitialized", which is not a valid value: https://developer.mozilla.org/docs/Web/API/Document/readyState
Comment 4•5 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 5•5 months ago
|
||
Hello,
I reproduced the issue on the latest Nightly (129.0a1/20240619213942) and Beta (128.0b5/20240619092300) under Windows 10 x64 and Ubuntu 22.04 LTS. Also checked the latest Release (127.0.1/20240618110440) but the issue does not appear to occur there.
On Nightly and Beta, the script fails to get injected in the index.html page and an error is shown in the web console - Unable to load script: moz-extension://a19b0a00-4a53-4472-894b-172256407c72/script.js
. The web console for the about:blank tab that opens as part of the STR does log “Hello world!”.
On Release, the script is injected in index.html, but shows a different message as opposed to what is expected in Comment 0 i.e. it shows extension script top? true
and the path to the index.html file, instead of “extension script top? true about:blank”. On the about:blank tab that opens as part of the STR, the same message is logged as in the case of the other two browser versions.
Reporter | ||
Comment 6•5 months ago
|
||
(In reply to Alex Cornestean from comment #5)
Hello,
I reproduced the issue on the latest Nightly (129.0a1/20240619213942) and Beta (128.0b5/20240619092300) under Windows 10 x64 and Ubuntu 22.04 LTS. Also checked the latest Release (127.0.1/20240618110440) but the issue does not appear to occur there.
On Nightly and Beta, the script fails to get injected in the index.html page and an error is shown in the web console -
Unable to load script: moz-extension://a19b0a00-4a53-4472-894b-172256407c72/script.js
. The web console for the about:blank tab that opens as part of the STR does log “Hello world!”.On Release, the script is injected in index.html, but shows a different message as opposed to what is expected in Comment 0 i.e. it shows
extension script top? true
and the path to the index.html file, instead of “extension script top? true about:blank”. On the about:blank tab that opens as part of the STR, the same message is logged as in the case of the other two browser versions.
There may be a misunderstanding here. The issue is not whether the addon content script gets injected into the index.html page. The issue is whether the addon content script gets injected into the new tab created by window.open().
Comment 7•5 months ago
|
||
Thank you for the clarification !
I checked on Chrome to see how the extension should behave and then I re-tested and reproduced on the latest Nightly (129.0a1/20240620213827), Beta (128.0b5/20240619092300) and Release (127.0.1/20240618110440) under Windows 10 x64 and Ubuntu 22.04 LTS.
The script fails to inject in the about:blank tab and "extension script top? true about:blank" is not logged to console. Only “Hello world!” is logged.
Comment 8•5 months ago
|
||
This is a known issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1486036#c3
I'll keep this bug open instead of marking it as a duplicate because this bug makes it obvious that the issue is not specific to iframes (bug 1486036 / bug 1415539).
Description
•