DevTools fails to load with gray window when opened from `./mach wpt`
Categories
(DevTools :: General, defect)
Tracking
(firefox116 fixed)
| Tracking | Status | |
|---|---|---|
| firefox116 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
Details
Attachments
(1 file)
Thank you for helping make Firefox better. If you are reporting a defect, please complete the following:
What were you doing?
Please tell us what site you were on, and what steps led to the error you are reporting
- Run
./mach wpt /html/semantics/disabled-elements/event-propagate-disabled.tentative.htmlon Windows non-artifact local build - Open DevTools
- See it opens
What happened?
This error consistently happens when opening DevTools:
4:50.48 pid:836 JavaScript error: resource://devtools/shared/loader/base-loader.sys.mjs, line 192: Error: Module `resource://devtools/shared/loader/builtin-modules.js` is not found at resource://devtools/shared/loader/builtin-modules.js
What should have happened?
It should open without errors
Anything else we should know?
This is regressed for a fair amount of time but I never cared much to bisect. 🙄
Comment 1•2 years ago
|
||
Thanks for filing,
Can you share your mozconfig file here? You also mention this breaks on non-artifact, does it mean it works on artifact builds.
If you run Firefox and open devtools there is no issue either?
Thanks
| Assignee | ||
Comment 2•2 years ago
|
||
mk_add_options AUTOCLOBBER=1
ac_add_options --disable-optimize
I did not try artifact builds, I just wanted to be as specific as possible. And yes it works when running ./mach run.
Comment 3•2 years ago
|
||
Thanks for checking, nothing of odd in this mozconfig file.
This sounds like a build/packaging issue, because there's no reason a build would have devtools/shared/loader/base-loader.sys.mjs but not devtools/shared/loader/builtin-modules.js
Is there any way ./mach wpt could be using another binary than the one you use when doing ./mach run?
If you try to hit resource://devtools/shared/loader/builtin-modules.js in a tab of the browser which was opened for ./mach wpt does it load a file (trying to see if this would be a loader issue).
| Assignee | ||
Comment 4•2 years ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #3)
Is there any way
./mach wptcould be using another binary than the one you use when doing./mach run?
I doubt that's the case, about:support shows the same binary: \obj-x86_64-pc-windows-msvc\dist\bin\firefox.exe.
If you try to hit
resource://devtools/shared/loader/builtin-modules.jsin a tab of the browser which was opened for./mach wptdoes it load a file (trying to see if this would be a loader issue).
Interestingly:
Access to the file was denied
The file at /C:/Users/sasch/Documents/GitHub/gecko-dev/obj-x86_64-pc-windows-msvc/dist/bin/browser/chrome/devtools/modules/devtools/shared/loader/builtin-modules.js is not readable.
It may have been removed, moved, or file permissions may be preventing access.
But the path exist (as a symlink to devtools/shared/loader/builtin-modules.js), so I'm confused. This doesn't happen on ./mach run, maybe some different sandbox rule is applied for WPT?
Comment 5•2 years ago
|
||
I wonder if the fact that Firefox is started from the wptrunner in this case means it could have different permissions than when you run it from ./mach run. And it's also puzzling that this would only be an issue for builtin-modules.js but not for base-loader.sys.mjs. Could it be related to the extension of the file?
Comment 6•2 years ago
|
||
Mike, is this a known issue on windows, where certain files can't be accessed even when other files in the same folder are loaded just fine?
Comment 7•2 years ago
|
||
Kagami, could you try to load two additional paths, same as what you did for comment 4:
- resource://devtools/shared/loader/Loader.sys.mjs
- resource://devtools/shared/loader/browser-loader.js
Could you also try to set the following env variable MOZ_DISABLE_CONTENT_SANDBOX=1 to see if it helps
| Assignee | ||
Comment 8•2 years ago
|
||
No file in resource://devtools/ is accessible through the address bar, including base-loader.sys.mjs. Disabling the sandbox helps and also allows devtools to open.
I guess I need to bisect...
| Assignee | ||
Comment 9•2 years ago
|
||
Did not bisect because of build issues, but it seems AddDeveloperRepoDirToPolicy fails because of the lack of environment variable: https://searchfox.org/mozilla-central/rev/fb55a4ee44a9a95d099aa806ca494eb988252ded/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp#246-250, on WPT but not on ./mach run.
Hello Bob and James, do you know why WPT is not getting env var for the sandbox rule? Maybe either WPT or sandbox started doing something special?
| Assignee | ||
Comment 10•2 years ago
|
||
But then how can this not happen on macOS but only on Windows? 🤔
Comment 11•2 years ago
|
||
(In reply to Kagami [:saschanaz] from comment #10)
But then how can this not happen on macOS but only on Windows? 🤔
FWIW, Nicolas from the team tested this on Windows and didn't reproduce the issue.
| Assignee | ||
Comment 12•2 years ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #11)
(In reply to Kagami [:saschanaz] from comment #10)
But then how can this not happen on macOS but only on Windows? 🤔
FWIW, Nicolas from the team tested this on Windows and didn't reproduce the issue.
Can you check whether Nicolas enabled Developer Mode on Windows, which enables symlink support?
Comment 13•2 years ago
|
||
(per discussion on Matrix, Nicolas also tried after enabling this, but could not reproduce)
Comment 14•2 years ago
|
||
(In reply to Kagami [:saschanaz] from comment #9)
Did not bisect because of build issues, but it seems AddDeveloperRepoDirToPolicy fails because of the lack of environment variable: https://searchfox.org/mozilla-central/rev/fb55a4ee44a9a95d099aa806ca494eb988252ded/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp#246-250, on WPT but not on
./mach run.Hello Bob and James, do you know why WPT is not getting env var for the sandbox rule? Maybe either WPT or sandbox started doing something special?
I don't think there's been a sandbox change to affect this and it seems from comment 10 that this doesn't affect Windows.
| Assignee | ||
Comment 15•2 years ago
|
||
Not sure why Linux is okay without this, but this feels right.
(macOS does not depend on MOZ_DEVELOPER_REPO_DIR since https://bugzilla.mozilla.org/show_bug.cgi?id=1380690)
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Updated•2 years ago
|
Comment 17•2 years ago
|
||
| bugherder | ||
Updated•2 years ago
|
Description
•