Closed Bug 1954474 Opened 7 months ago Closed 6 months ago

[Dev Tools] Error: Protocol error (NS_ERROR_XPC_BAD_CONVERT_NATIVE); when opening the dev tools at https://openguessr.com/

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(firefox138 fixed, firefox139 fixed)

RESOLVED FIXED
139 Branch
Tracking Status
firefox138 --- fixed
firefox139 --- fixed

People

(Reporter: ferrytinymailbox, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Error:
Error: Protocol error (NS_ERROR_XPC_BAD_CONVERT_NATIVE): Component returned failure code: 0x8057000a (NS_ERROR_XPC_BAD_CONVERT_NATIVE) [nsIJSEnumerator.next] from: server0.conn4.watcher3 (resource://devtools/server/connectors/js-process-actor/target-watchers/window-global.sys.mjs:160:0)

Server Stack: createTargetsForWatcher@resource://devtools/server/connectors/js-process-actor/target-watchers/window-global.sys.mjs:160:3
#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: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:533:35
open@resource://devtools/client/framework/toolbox.js:975:41

This does not happen on a new profile with the same extensions, but it does happen in a private tab

Thanks for the report!

Can you share your about:support information? It will contain the list of addons you are using, which might be relevant here.
Also can you describe in more details how many windows / private windows you had when trying to open devtools? Was https://openguessr.com/ opened in the private window?

Also which operating system are you using, and which Firefox version?

Thanks!

Flags: needinfo?(ferrytinymailbox)

Note that restarting Firefox made it no longer reproduceable.

Also can you describe in more details how many windows / private windows you had when trying to open devtools?

I think I had around 30-40 tabs in 1 window open. At the start I had 0 private windows open, I opened one to test if the issue also happened in that tab.

Was https://openguessr.com/ opened in the private window?

Opening the dev tools on this website caused the crash for me. Later during the day I also got the crash with any other other website. The website in question seems like a red herring to me that I discovered more information about it

More proof that the website is a red herring is that at my work place, one co-worker (on Ubuntu, Firefox via Snap) opened the dev tools at a standard NGINX error page (a 502 in this case, which did not refer to any other external links) and also got the browser dev tools bug at every other tab, they also fixed the issue by restarting Firefox

Also which operating system are you using, and which Firefox version?

Running 136.0.1 (64-bits) on Arch Linux

Flags: needinfo?(ferrytinymailbox)
Duplicate of this bug: 1955853
Duplicate of this bug: 1955684

We're getting other reports about this, we should look into it
The error is triggered by Services.ww.getWindowEnumerator in https://searchfox.org/mozilla-release/rev/62f34235d373482fc8c3c6a07f3a60c3e224d642/devtools/server/connectors/js-process-actor/target-watchers/window-global.sys.mjs#160-162

for (const window of Services.ww.getWindowEnumerator()) {
  topWindows.push(window);
}

We couldn't reproduce this issue so far. Might be something related to extensions creating weird windows.
Ultimately Services.ww.getWindowEnumerator() shouldn't throw like that, so it should be fixed at the platform level.
Alex will check if this error would indeed crash the toolbox without the AppErrorBoundary

Severity: -- → S3
Priority: -- → P2
Assignee: nobody → poirot.alex
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2e00ffc1402a [devtools] Avoid crashing DevTools when processing some buggy top level documents. r=devtools-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
Duplicate of this bug: 1959319

Alex, should we request an uplift to 138? We're getting multiple reports of this issue

Flags: needinfo?(poirot.alex)

Comment on attachment 9475052 [details]
Bug 1954474 - [devtools] Avoid crashing DevTools when processing some buggy top level documents.

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: DevTools may crash on opening.
    Unfortunately, the STR is unknown. It may involve some particular add-on or preference.
    But we got 3 reports about this particular exception in a short period of time.
  • 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 quite simple.
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(poirot.alex)
Attachment #9475052 - Flags: approval-mozilla-beta?

Comment on attachment 9475052 [details]
Bug 1954474 - [devtools] Avoid crashing DevTools when processing some buggy top level documents.

Approved for 138.0b6

Attachment #9475052 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Duplicate of this bug: 1960170
Duplicate of this bug: 1963231
Duplicate of this bug: 1955183
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: