[devtools-toolbox-crash] Error: Protocol error (TypeError): can't access dead object from: server0.conn3.watcher2.process53801//domwalker700 (resource://devtools/server/actors/inspector/event-collector.js:278:21)
Categories
(DevTools :: Inspector, defect, P2)
Tracking
(firefox-esr153 fixed, firefox153 fixed, firefox154 fixed)
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 3 external files)
Currently experiencing the issue on https://risetheexperience.com/pages/benefits, might affect other websites.
STRs:
- install Stylus (https://addons.mozilla.org/fr/firefox/addon/styl-us/)
- open a tab on https://risetheexperience.com/pages/benefits
- open devtools > inspector
- do a hard reload (ctrl or cmd + shift + R) (or disable cache in the netmonitor)
The hard-reload vs reload or cache disabling is not 100% necessary, on some other profiles I consistently get it regardless of that. But on a clean profile that seems necessary.
Seems like a race condition so it might be hardware specific.
In the Browser Console I can see:
Failed to start [root-node] legacy listener for target server0.conn0.watcher2.process9//windowGlobalTarget4789 Error: Protocol error (NS_ERROR_FAILURE): Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [inIDeepTreeWalker.currentNode] from: server0.conn0.watcher2.process9//domwalker4463 (resource://devtools/server/actors/inspector/document-walker.js:73:36)
onPacket resource://devtools/shared/protocol/Front.js:405
DevTools RDP*request resource://devtools/shared/protocol/Front.js:321
name resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:94
reparentRemoteFrame resource://devtools/client/fronts/walker.js:416
| Assignee | ||
Updated•5 months ago
|
Comment 1•5 months ago
|
||
Note that bug 2042894's patch: https://phabricator.services.mozilla.com/D302827
significantly helps by showing all the stacktraces, and clearly shows the something went wrong and that a bug can be filled.
| Assignee | ||
Comment 2•4 months ago
|
||
(In reply to Alexandre Poirot [:ochameau] from comment #1)
Note that bug 2042894's patch: https://phabricator.services.mozilla.com/D302827
significantly helps by showing all the stacktraces, and clearly shows the something went wrong and that a bug can be filled.
Stumbled upon the crash today:
Error in Inspector Panel:
Error: Protocol error (TypeError): can't access dead object from: server0.conn3.watcher2.process53801//domwalker700 (resource://devtools/server/actors/inspector/event-collector.js:278:21)
Client Packet:
{
"type": "querySelector",
"node": "server0.conn3.watcher2.process53801//domnode699",
"selector": "body",
"to": "server0.conn3.watcher2.process53801//domwalker700"
}
Server Packet:
{
"from": "server0.conn3.watcher2.process53801//domwalker700",
"error": "TypeError",
"message": "can't access dead object",
"fileName": "resource://devtools/server/actors/inspector/event-collector.js",
"lineNumber": 278,
"columnNumber": 21
}
Server Stack:
getDOMListeners@resource://devtools/server/actors/inspector/event-collector.js:278:21
getListeners@resource://devtools/server/actors/inspector/event-collector.js:340:28
hasListeners@resource://devtools/server/actors/inspector/event-collector.js:226:17
hasEventListeners@resource://devtools/server/actors/inspector/event-collector.js:807:21
hasEventListeners@resource://devtools/server/actors/inspector/node.js:445:43
form@resource://devtools/server/actors/inspector/node.js:239:37
write@resource://devtools/shared/protocol/types.js:374:32
types.addArrayType/write/<@resource://devtools/shared/protocol/types.js:224:33
write@resource://devtools/shared/protocol/types.js:224:16
write@resource://devtools/shared/protocol/types.js:272:39
write@resource://devtools/shared/protocol/Response.js:101:22
write@resource://devtools/shared/protocol/Response.js:49:28
sendReturn@resource://devtools/shared/protocol/Actor.js:258:38
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Comment 3•4 months ago
|
||
Fixes the issue locally for me when Stylus is installed.
Updated•4 months ago
|
| Assignee | ||
Comment 4•4 months ago
|
||
From a quick logging it seems that this issue occurs on the html element, when looping on the listeners returned by EventListenerService::GetListenerInfoFor.
I managed to simplify the test case to a basic html page + webextension content script, will upload the test case.
| Assignee | ||
Comment 5•4 months ago
|
||
Unzip and load as temporary webextension via about:debugging.
| Assignee | ||
Comment 6•4 months ago
|
||
Open the test page, with the webextension installed, make sure devtools are set to open on the inspector. Reload the page, open devtools, the panel should crash.
| Assignee | ||
Comment 7•4 months ago
•
|
||
Key parts:
- Markup:
- create an iframe pointing to about:blank
- insert it in the DOM
- immediately navigate it
<script type="text/javascript">
const frame = document.createElement("iframe");
frame.src = "about:blank";
document.body.appendChild(frame);
frame.src = "https://example.com"
</script>
- Extension
- only defines a content script
- config: run at document start, match all urls, match about:blank, match all frames
- code itself, if the current global is an about:blank iframe, add an event listener on the parent (the actual type of the event doesn't matter)
const isFrame = window !== top;
const isAboutBlank = location.href === "about:blank";
if (isFrame && isAboutBlank) {
window.parent.addEventListener("click", function() {});
}
The compartment for the event listener must be destroyed when the frame navigates and we end up returning a dead wrapper listener object.
Comment 10•4 months ago
|
||
| bugherder | ||
Updated•3 months ago
|
| Assignee | ||
Comment 17•3 months ago
|
||
Based on our probes, this issue spiked significantly in 153. It's not clear what was the regressor, but since 153 hit the release channel we have a lot of reports + ~300 events per day for this error. We should uplift.
Comment 18•3 months ago
|
||
firefox-esr153 Uplift Approval Request
- User impact if declined/Reason for urgency: Based on our toolbox error probes this is the most frequent cause of devtools toolbox crashes (~300 per day, while we usually have a total of ~700 so around +50% of increase).
https://sql.telemetry.mozilla.org/queries/119237#291111
- Code covered by automated testing?: no
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: n/a
- Risk associated with taking this patch: low
- Explanation of risk level: Adding simple guards in devtools only JS.
- String changes made/needed?: n/a
- Is Android affected?: no
| Assignee | ||
Comment 19•3 months ago
|
||
Fixes the issue locally for me when Stylus is installed.
Original Revision: https://phabricator.services.mozilla.com/D308247
Comment 20•3 months ago
|
||
firefox-release Uplift Approval Request
- User impact if declined/Reason for urgency: Based on our toolbox error probes this is the most frequent cause of devtools toolbox crashes (~300 per day, while we usually have a total of ~700 so around +50% of increase).
https://sql.telemetry.mozilla.org/queries/119237#291111
- Code covered by automated testing?: no
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: n/a
- Risk associated with taking this patch: low
- Explanation of risk level: Adding simple guards in devtools only JS.
- String changes made/needed?: n/a
- Is Android affected?: no
| Assignee | ||
Comment 21•3 months ago
|
||
Fixes the issue locally for me when Stylus is installed.
Original Revision: https://phabricator.services.mozilla.com/D308247
Updated•3 months ago
|
Updated•3 months ago
|
Comment 22•3 months ago
|
||
| uplift | ||
Updated•3 months ago
|
Updated•3 months ago
|
Comment 23•3 months ago
|
||
| uplift | ||
Updated•3 months ago
|
Updated•3 months ago
|
Description
•