The Web Developer Tools panel has crashed.
Categories
(DevTools :: Object Inspector, defect)
Tracking
(firefox141 fixed, firefox142 fixed)
People
(Reporter: thomhehl, Assigned: ochameau)
References
Details
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
Error in Web Developer Tools:
Error: Protocol error (TypeError): can't access property "document", this.targetActor.window is null from: server0.conn2.watcher3 (resource://devtools/server/actors/webconsole/listeners/document-events.js:68:11)
Client Packet:
{
"type": "watchResources",
"resourceTypes": [
"document-event"
],
"to": "server0.conn2.watcher3"
}
Server Packet:
{
"from": "server0.conn2.watcher3",
"error": "TypeError",
"message": "can't access property \"document\", this.targetActor.window is null",
"fileName": "resource://devtools/server/actors/webconsole/listeners/document-events.js",
"lineNumber": 68,
"columnNumber": 11
}
Server Stack:
listen@resource://devtools/server/actors/webconsole/listeners/document-events.js:68:11
watch@resource://devtools/server/actors/resources/document-event.js:97:19
watchResources@resource://devtools/server/actors/resources/index.js:367:15
addOrSetSessionDataEntry@resource://devtools/server/actors/targets/session-data-processors/resources.js:19:21
addOrSetSessionDataEntry@resource://devtools/server/actors/targets/base-target-actor.js:86:23
#addOrSetSessionDataEntry@resource://devtools/server/connectors/js-process-actor/DevToolsProcessChild.sys.mjs:398:21
receiveMessage@resource://devtools/server/connectors/js-process-actor/DevToolsProcessChild.sys.mjs:323:46
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/resource/resource-command.js:1047:31
| Assignee | ||
Comment 1•6 months ago
|
||
Thomas, Do you recall on what page this failed, if you are comfortable sharing it? This exception may relate to a specific behavior of that page.
| Assignee | ||
Comment 2•6 months ago
|
||
Actually, I found a way to reproduce this intermittently via the following extreme test page:
data:text/html,<iframe src="data:text/html,foo"></iframe><script>setInterval(()=>{let i = document.querySelector("iframe"); if (i) {i.remove()}else{i=document.createElement("iframe"); i.src="data:text/html,foo"+new Date().getTime();document.body.appendChild(i);}},10);</script>
DevTools fails opening when an iframe is being destroying in middle of its initialization sequence.
I looks like a possible regression of bug 1892411, but it was landed only in Firefox 141, whereas the two duplicated reports we got were reported against 140...
| Assignee | ||
Comment 4•6 months ago
|
||
The target actor is correctly destroyed and unregistered on inner-window-destroyed event.
But there is a small slice of time just before that where the related docshell
no longer exposes a window object.
We can't ignore the exception in the parent process, from the JSProcessActor.sendQuery
method call as the related content process isn't destroyed, only the window global is.
We may start holding a stable reference to window on the target actor once
we get rid of non-EFT codepaths.
Updated•6 months ago
|
Comment 6•6 months ago
|
||
| bugherder | ||
Updated•6 months ago
|
Comment 10•6 months ago
|
||
The target actor is correctly destroyed and unregistered on inner-window-destroyed event.
But there is a small slice of time just before that where the related docshell
no longer exposes a window object.
We can't ignore the exception in the parent process, from the JSProcessActor.sendQuery
method call as the related content process isn't destroyed, only the window global is.
We may start holding a stable reference to window on the target actor once
we get rid of non-EFT codepaths.
Original Revision: https://phabricator.services.mozilla.com/D256013
Updated•6 months ago
|
Comment 11•6 months ago
|
||
firefox-release Uplift Approval Request
- User impact if declined: Users might not be able to open DevTools on pages using iframes
- Code covered by automated testing: no
- Fix verified in Nightly: no
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: -
- Risk associated with taking this patch: pretty low
- Explanation of risk level: this is only adding a guard in DevTools code to prevent an exception. We don't have test nor this is verified as the issue occured randomly and might depend on hardware
- String changes made/needed: -
- Is Android affected?: yes
Updated•6 months ago
|
Updated•6 months ago
|
Comment 13•6 months ago
|
||
| uplift | ||
Description
•