Open Bug 1887720 Opened 6 months ago Updated 6 months ago

Blank DevTools

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

Details

From Bug 1703589

Report of a blank DevTools UI (see https://youtu.be/4rIWm-I0vb4?si=EJO81f7tggIfyZWP)

Stacktrace from the Browser Toolbox:

Tried to send a 'watchTargets' method reply on an already destroyed actor 'watcher' Actor.js:206:21
sendReturn resource://devtools/shared/protocol/Actor.js:206
Failed to create DevTools Frame target for browsingContext 75161927688 : DOMException: Actor 'DevToolsFrame' destroyed before query 'DevToolsFrameParent:instantiate-already-available' was resolved <empty string> frame-helper.js:141:13
Failed to create DevTools Frame target for browsingContext 75161927689 : DOMException: Actor 'DevToolsFrame' destroyed before query 'DevToolsFrameParent:instantiate-already-available' was resolved <empty string> frame-helper.js:141:13
Failed to create DevTools Frame target for browsingContext 75161927715 : DOMException: Actor 'DevToolsFrame' destroyed before query 'DevToolsFrameParent:instantiate-already-available' was resolved <empty string> frame-helper.js:141:13
Failed to create DevTools Frame target for browsingContext 75161927690 : DOMException: Actor 'DevToolsFrame' destroyed before query 'DevToolsFrameParent:instantiate-already-available' was resolved <empty string> frame-helper.js:141:13
Failed to create DevTools Frame target for browsingContext 75161927691 : DOMException: Actor 'DevToolsFrame' destroyed before query 'DevToolsFrameParent:instantiate-already-available' was resolved <empty string> frame-helper.js:141:13
Error when attaching target: Error: Connection closed, pending request to server0.conn0.windowGlobal75161927698/thread1, type isAttached failed

Request stack:
request@resource://devtools/shared/protocol/Front.js:299:14
generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:47:19
attachThread@resource://devtools/client/fronts/targets/target-mixin.js:447:49
baseFrontClassDestroy resource://devtools/shared/protocol/Front.js:105
destroy resource://devtools/shared/protocol/Front.js:73
destroy resource://devtools/shared/protocol/Pool.js:211
baseFrontClassDestroy resource://devtools/shared/protocol/Front.js:109
_onTargetDestroyed resource://devtools/shared/commands/target/target-command.js:369
_emit resource://devtools/shared/event-emitter.js:242
emit resource://devtools/shared/event-emitter.js:186
emit resource://devtools/shared/event-emitter.js:330
_onTargetDestroyed resource://devtools/client/fronts/watcher.js:74
_emit resource://devtools/shared/event-emitter.js:242
emit resource://devtools/shared/event-emitter.js:186
emit resource://devtools/shared/event-emitter.js:330
onPacket resource://devtools/shared/protocol/Front.js:348
onPacket resource://devtools/client/devtools-client.js:458
send resource://devtools/shared/transport/local-transport.js:67
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
target-command.js:227:15
Exception while opening the toolbox TypeError: URL constructor: is not a valid URL. TypeError: URL constructor: is not a valid URL.
_getDebugTargetData resource://devtools/client/framework/toolbox.js:1364
isDebugTargetFenix resource://devtools/client/framework/toolbox.js:1378
_getPickerAdditionalClassName resource://devtools/client/framework/toolbox.js:2171
_buildPickerButton resource://devtools/client/framework/toolbox.js:2157
_buildButtons resource://devtools/client/framework/toolbox.js:1994
open resource://devtools/client/framework/toolbox.js:1020
toolbox.js:1101:17
Error while calling actor 'target-configuration's method 'updateConfiguration' this._browsingContext is null Actor.js:105:13
TypeError: this._browsingContext is null
_setCacheDisabled resource://devtools/server/actors/target-configuration.js:461
_updateParentProcessConfiguration resource://devtools/server/actors/target-configuration.js:273
updateConfiguration resource://devtools/server/actors/target-configuration.js:217
handler resource://devtools/shared/protocol/Actor.js:198
onPacket resource://devtools/server/devtools-server-connection.js:379
send resource://devtools/shared/transport/local-transport.js:67
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
Actor.js:112:15
Error while calling actor 'target-configuration's method 'updateConfiguration' this._browsingContext is null Actor.js:105:13
TypeError: this._browsingContext is null
_setServiceWorkersTestingEnabled resource://devtools/server/actors/target-configuration.js:329
_updateParentProcessConfiguration resource://devtools/server/actors/target-configuration.js:267
updateConfiguration resource://devtools/server/actors/target-configuration.js:217
handler resource://devtools/shared/protocol/Actor.js:198
onPacket resource://devtools/server/devtools-server-connection.js:379
send resource://devtools/shared/transport/local-transport.js:67
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
Actor.js:112:15
Sync encountered an error - see about:sync-log for the log file. 2 policies.sys.mjs:972:15
Missing resource in locale it: devtools/client/toolbox.ftl

The reporter mentioned additional errors about addons, but I'm not sure they are related to the issue:

1711145222506 addons.xpi ERROR Failed to install distribution add-on /app/lib/firefox/distribution/extensions/langpack-nb-NO@firefox.mozilla.org.xpi: Error: File /app/lib/firefox/distribution/extensions/langpack-nb-NO@firefox.mozilla.org.xpi does not contain a valid manifest(resource://gre/modules/addons/XPIInstall.sys.mjs:667:11) JS Stack trace: loadManifest@XPIInstall.sys.mjs:667:11
awaitPromise@XPIProvider.sys.mjs:215:15
installDistributionAddons@XPIProvider.sys.mjs:2971:35
checkForChanges@XPIProvider.sys.mjs:3084:22
startup@XPIProvider.sys.mjs:2526:12
callProvider@AddonManager.sys.mjs:227:31
_startProvider@AddonManager.sys.mjs:536:17
startup@AddonManager.sys.mjs:749:14
startup@AddonManager.sys.mjs:3690:26
observe@amManager.sys.mjs:73:29 Log.sys.mjs:722

Looking at the shared screencast this seems to happen while opening devtools on a Discord tab.
I could not reproduce so far, but the following exception at least might be actionable:

Exception while opening the toolbox TypeError: URL constructor: is not a valid URL. TypeError: URL constructor: is not a valid URL.
_getDebugTargetData resource://devtools/client/framework/toolbox.js:1364

Not sure how we could get a target url which is not a valid URL, but given that the constructor can throw we might want to guard it?

Note that the report involves attachThread, which has been removed in bug 1713093.
And this also involves client side worker target, which is still a thing in the browser toolbox. But I'm planning to also get rid of that in bug 1651518 (which is ready for review, I'm only waiting for bug 1866814 to be r+).

So there is the URL constructor exception left, which may still be relevant addressing. But the other exceptions should be ignored.

Severity: -- → S3
Depends on: 1651518, 1866814
Priority: -- → P2

I imagine that the URL constructor exception comes from this line:
https://searchfox.org/mozilla-central/rev/7bbc54b70e348a11f9cd12071ada2cb47c8a14e3/devtools/client/framework/toolbox.js#1350

const url = new URL(this.win.location);

This is surprising as win is the toolbox window... Could the toolbox location be invalid? Sounds very unlikely, except may be on toolbox closing??

You need to log in before you can comment on or make changes to this bug.