Closed Bug 1916286 Opened 1 year ago Closed 1 year ago

resource://devtools/shared/loader/builtin-modules.js fails to open on Windows local build

Categories

(DevTools :: General, defect, P1)

defect

Tracking

(firefox132 fixed)

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: saschanaz, Assigned: bobowen)

References

Details

Attachments

(1 file)

This started to happen after mozweek, the clobber build doesn't help and the whole devtools is broken. 😞

cc bobowen in case this is sandbox related.

Log when opening devtools:

console.error: "Failed to sendQuery in DevToolsProcessParent" "DevToolsProcessParent:watchTargets"
console.error: "Error: Module `resource://devtools/shared/loader/builtin-modules.js` is not found at resource://devtools/shared/loader/builtin-modules.js"
console.error: "Error while calling actor 'watcher's method 'watchTargets'" "Module `resource://devtools/shared/loader/builtin-modules.js` is not found at resource://devtools/shared/loader/builtin-modules.js"
console.error: (new Error("Module `resource://devtools/shared/loader/builtin-modules.js` is not found at resource://devtools/shared/loader/builtin-modules.js", "resource://devtools/shared/loader/base-loader.sys.mjs", 193))
console.error: "Exception while opening the toolbox" "Error: Protocol error (Error): Module `resource://devtools/shared/loader/builtin-modules.js` is not found at resource://devtools/shared/loader/builtin-modules.js from: server0.conn0.watcher2 (resource://devtools/shared/loader/base-loader.sys.mjs:193:15)" (new Error("Protocol error (Error): Module `resource://devtools/shared/loader/builtin-modules.js` is not found at resource://devtools/shared/loader/builtin-modules.js from: server0.conn0.watcher2 (resource://devtools/shared/loader/base-loader.sys.mjs:193:15)", "resource://devtools/shared/protocol/Front.js", 382))
onPacket/<@resource://devtools/shared/protocol/Front.js:382:31
DevTools RDP*request@resource://devtools/shared/protocol/Front.js:299:14
generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:47:19
startListening@resource://devtools/shared/commands/target/target-command.js:478:35
open/<@resource://devtools/client/framework/toolbox.js:956:41
open@resource://devtools/client/framework/toolbox.js:1143:18
_createToolbox@resource://devtools/client/framework/devtools.js:750:19

JavaScript error: resource://devtools/client/framework/toolbox.js, line 4235: TypeError: can't access property "forEach", this.toolbarButtons is undefined

The exception originates from here and seems to be about not being able to load resource://devtools/shared/loader/builtin-modules.js from a content process.

I'm running DevTools fine from today's Nightly on Windows 11.
Is there some particular sandbox pref/settings different between local build and nightly?

krosylight, is the failure only happening with local build and it works fine on Nightly?

Flags: needinfo?(krosylight)

nightly is fine. The local build uses symlink to obj directory so that one doesn't have to rebuild every time when a JS file is changed, and for sandbox that matters.

Flags: needinfo?(krosylight)

(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #3)

The local build uses symlink to obj directory so that one doesn't have to rebuild every time when a JS file is changed, and for sandbox that matters.

I don't think this is true for a regular Windows local build, as symlinks are not supported. What kind of environment are you using to build your Windows local build?

Flags: needinfo?(krosylight)

Symlinks on Windows have been supported since 2020: bug 1634454, bug 1635428.

Flags: needinfo?(krosylight)

It looks like we are blocking another resource with the new USER_RESTRICTED access token level that we are testing in Nightly.
The builtin-modules.js file itself is being brokered as normal, but there is another resource MountPointManager that is blocked afterwards.

Assignee: nobody → bobowencode
Blocks: 1403931
Status: NEW → ASSIGNED

Adding read access to \??\MountPointManager seems to fix the problem.
Patch up soon.

Severity: -- → S4
Priority: -- → P1

Thank you Bob!

Pushed by bobowencode@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5ab7d0c41acd Add rule for MountPointManager in AddDeveloperRepoDirToPolicy. r=yjuglaret
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: