Closed Bug 1979448 Opened 6 months ago Closed 5 months ago

Bringing up Dev tools while browsing github: "Web Developer tools panel has crashed"

Categories

(DevTools :: General, defect, P3)

defect

Tracking

(firefox144 fixed)

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: benjamin.garwin, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Bringing up dev tools while viewing this page, using the keyboard shortcut: https://github.com/processing/p5.js/blob/main/src/math/random.js#L82

Error in Web Developer Tools:

Error: Protocol error (NS_ERROR_ILLEGAL_VALUE): Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXPCComponents_Utils.getSandboxMetadata] from: server0.conn0.watcher3 (resource://devtools/server/connectors/js-process-actor/target-watchers/content_script.sys.mjs:137:0)

Client Packet:

{
  "type": "watchTargets",
  "targetType": "content_script",
  "to": "server0.conn0.watcher3"
}

Server Packet:

{
  "from": "server0.conn0.watcher3",
  "error": "NS_ERROR_ILLEGAL_VALUE",
  "message": "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXPCComponents_Utils.getSandboxMetadata]",
  "fileName": "resource://devtools/server/connectors/js-process-actor/target-watchers/content_script.sys.mjs",
  "lineNumber": 137,
  "columnNumber": 0
}

Server Stack:

createTargetsForWatcher@resource://devtools/server/connectors/js-process-actor/target-watchers/content_script.sys.mjs:137:25
#watchNewTargetTypeForWatcher@resource://devtools/server/connectors/js-process-actor/DevToolsProcessChild.sys.mjs:203:40
receiveMessage@resource://devtools/server/connectors/js-process-actor/DevToolsProcessChild.sys.mjs:306:50

Stacktrace:

onPacket/<@resource://devtools/shared/protocol/Front.js:404:31
DevTools RDP*request@resource://devtools/shared/protocol/Front.js:320:14
generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:57:19
startListening@resource://devtools/shared/commands/target/target-command.js:532:35

Thanks for the report Ben.
Could you go to about:support and share the data here? I'm particularly interested in which extensions are installed, as it seems to relate to one.
Did this happen all the time, or is this intermittent?
if you create a new profile, can you reproduce the issue?

Thanks!

Flags: needinfo?(benjamin.garwin)
Attached file about:support text

I'm unable to repro the bug at this time with the same profile -- next time I'll try to capture the about:support data from the same session.

Unhelpfully, I did just do a major operating system upgrade, between filing the crashing defect and collecting this about:support data (attached) and trying to repro again.

Flags: needinfo?(benjamin.garwin)

We can replicate the checks done on the sandbox at https://searchfox.org/mozilla-central/rev/ab26427a8d31be475be11bbae0e04c84cc7f20ef/js/xpconnect/src/XPCComponents.cpp#1491-1505 to avoid calling the API if this is going to fail.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
See Also: → 1982229

Hi Luca, Can you take a look at the exception here? We had 2 reports in the past weeks for this error, do you know if something could have changed on the webextension side which would cause this issue?

Flags: needinfo?(lgreco)
Whiteboard: [devtools-triage]

(In reply to Julian Descottes [:jdescottes] from comment #5)

Hi Luca, Can you take a look at the exception here? We had 2 reports in the past weeks for this error, do you know if something could have changed on the webextension side which would cause this issue?

Hi Julian, I can't think of any change that we may have recently applied that would cause this kind of issue. I tried to reproduce this locally but I have not been able to hit the NS_ERROR_ILLEGAL_VALUE exception.

Based on a quick look to the underlying logic I'm wondering if this may happen to be hit if somehow we get from ExtensionContent.getAllContentScriptGlobals a sandbox global that is already a DeadWrapper and that to be what triggers the NS_ERROR_ILLEGAL_VALUE, unfortunately I didn't manage to recreate this scenario yet and so I couldn't confirm if a sandbox global reference which is already become a DeadWrapper would be triggering that error to be raised from getSandboxMetadata.

Flags: needinfo?(lgreco)

Thanks Luca, for now I'll just replicate the checks on our side to avoid the issue.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Whiteboard: [devtools-triage]
Pushed by jdescottes@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/473c353b5904 https://hg.mozilla.org/integration/autoland/rev/324bb66cc42a [devtools] Skip invalid extension sandboxes when creating DevTools targets, r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch
Duplicate of this bug: 1982229
Duplicate of this bug: 1984783
QA Whiteboard: [qa-triage-done-c145/b144]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: