Using the Browser Toolbox in debugging mode with shared console frequently breaks due to "can't access property \"traits\", this.client is null"
Categories
(DevTools :: Console, defect, P2)
Tracking
(firefox-esr78 unaffected, firefox89 wontfix, firefox90 wontfix, firefox91 fixed)
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox89 | --- | wontfix |
firefox90 | --- | wontfix |
firefox91 | --- | fixed |
People
(Reporter: standard8, Assigned: nchevobbe)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details |
What were you doing?
- Start up a developer build of Firefox (I'm on changeset b8840fca48)
- I have about:config, about:preferences open in tabs, as well as https://www.merriam-webster.com/dictionary/test
- Start up the Browser Toolbox, switch to the debugger and open the shared console.
- Open https://www.merriam-webster.com/dictionary/testing in a new tab.
- Reload the merriam-webster pages a bit, and wait a while.
What happened?
The shared console goes blank, can no longer be accessed. Lots of errors on the command line console (see below)
What should have happened?
Shared console and debugger should keep working.
Anything else we should know?
I was testing on Mac. Hitting some breakpoints seemed to make it happen quicker.
Errors on terminal:
console.error: ({})
> console.warn: "Listener for event 'worker' did not return a promise."
> console.warn: "Listener for event 'worker' did not return a promise."
Handler function threw an exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIHttpChannelInternal.remoteAddress]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource://devtools/server/actors/network-monitor/network-observer.js :: _onResponseHeader :: line 1043" data: no]
Stack: _onResponseHeader@resource://devtools/server/actors/network-monitor/network-observer.js:1043:5
_dispatchActivity@resource://devtools/server/actors/network-monitor/network-observer.js:620:14
NetworkObserver.prototype.observeActivity<@resource://devtools/server/actors/network-monitor/network-observer.js:729:12
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22
Line: 1043, column: 0
console.error: ({})
> console.warn: "Listener for event 'worker' did not return a promise."
> console.error: (new TypeError("can't access property \"traits\", this.client is null", "resource://devtools/client/fronts/targets/target-mixin.js", 276))
TypeError: can't access property "traits", this.client is null: getTrait@resource://devtools/client/fronts/targets/target-mixin.js:276:7
get isTopLevel@resource://devtools/client/fronts/targets/target-mixin.js:147:17
_onTargetDestroyed@resource://devtools/client/framework/toolbox.js:732:9
_emit@resource://devtools/shared/event-emitter.js:226:34
emit@resource://devtools/shared/event-emitter.js:172:18
emit@resource://devtools/shared/event-emitter.js:324:18
_onTargetDestroyed@resource://devtools/shared/commands/target/target-command.js:272:28
_workerListChanged@resource://devtools/shared/commands/target/legacy-target-watchers/legacy-workers-watcher.js:104:14
console.error: (new TypeError("can't access property \"traits\", this.client is null", "resource://devtools/client/fronts/targets/target-mixin.js", 276))
TypeError: can't access property "traits", this.client is null: getTrait@resource://devtools/client/fronts/targets/target-mixin.js:276:7
get isTopLevel@resource://devtools/client/fronts/targets/target-mixin.js:147:17
onTargetDestroyed@resource://devtools/client/debugger/src/client/firefox.js:152:7
_emit@resource://devtools/shared/event-emitter.js:226:34
emit@resource://devtools/shared/event-emitter.js:172:18
emit@resource://devtools/shared/event-emitter.js:324:18
_onTargetDestroyed@resource://devtools/shared/commands/target/target-command.js:272:28
_workerListChanged@resource://devtools/shared/commands/target/legacy-target-watchers/legacy-workers-watcher.js:104:14
I think the first couple were probably from the site that I was loading; this.client is null
error gets repeated lots.
Assignee | ||
Comment 1•3 years ago
|
||
I can reproduce:
- Firefox with a tab on https://nchevobbe.github.io/demo/console-test-app.html
- open the browser toolbox
- go to the console / open split console
- refresh console-test-app tab
-> console goes blank
I'm taking care of this right now
Assignee | ||
Comment 2•3 years ago
|
||
Bug 1695744 made the WorkerDescriptor
extend a DescriptorMixin
instead of the TargetMixin
, but the descriptor mixin is missing the url
getter that the descriptor one had (other changes later on might have caused the issue to show up, as it landed quite a while ago)
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
It can happen that the getTrait method is called on a given target after it has
been destroyed, and in such case, this.client
is null, which was throwing.
Assignee | ||
Comment 4•3 years ago
|
||
The getter was using this.url , which does not exist in the class,
nor in the descriptor-mixin.
The patch switches to this._url which is the actual property where
the url is stored.
Depends on D117011
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 6•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•