Firefox Nightly 95 can no longer connect to `mach test --jsdebugger xpcshell/...`
Categories
(DevTools :: Debugger, defect)
Tracking
(firefox-esr91 wontfix, firefox93 wontfix, firefox94 wontfix, firefox95 wontfix, firefox96 fixed)
People
(Reporter: nalexander, Assigned: jdescottes)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
I can no longer connect to the xpcshell
debug actor with Firefox Nightly 95. That is, I can no longer connect to localhost:6000
exposed by, for example
./mach test --jsdebugger toolkit/components/backgroundtasks/tests/xpcshell/test_backgroundtask_exitcodes.js
I can connect with Firefox Release 93.
I see errors like:
0:38.50 pid:43398 console.error: "Error while calling actor 'root's method 'listAddons'" "This root actor has no browser addons."
0:38.55 pid:43398 console.error: "Error while calling actor 'root's method 'listWorkers'" "This root actor has no workers."
but I don't know if these are the cause of the issue.
Reporter | ||
Comment 1•3 years ago
|
||
A regression window would be much appreciated, here. I just verified that I can connect with Firefox Beta 94.0b9, so this looks to be something in the Nightly 95 cycle.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
We probably only have the issue with devtools.browsertoolbox.fission set to true, which is only the case on Nightly.
So 94.0b9 might work just because it has the pref set to false.
Assignee | ||
Comment 3•2 years ago
|
||
The error occurs when the toolbox tries to connect to the target:
console.error: "Exception while opening the toolbox" "Error: Protocol error (noServiceWorkerRegistrations): This root actor has no service worker registrations. from: root" (new Error("Protocol error (noServiceWorkerRegistrations): This root actor has no service worker registrations. from: root", "resource://devtools/shared/protocol/Front.js", 362))
onPacket/<@resource://devtools/shared/protocol/Front.js:362:31
DevTools RDP*request@resource://devtools/shared/protocol/Front.js:289:14
generateRequestMethods/</frontProto[name]@resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:46:19
_updateRegistrations@resource://devtools/shared/commands/target/legacy-target-watchers/legacy-serviceworkers-watcher.js:212:30
_onRegistrationListChanged@resource://devtools/shared/commands/target/legacy-target-watchers/legacy-serviceworkers-watcher.js:173:16
listen@resource://devtools/shared/commands/target/legacy-target-watchers/legacy-serviceworkers-watcher.js:83:16
startListening@resource://devtools/shared/commands/target/target-command.js:397:47
This error occurs because xpcshell is treated as a "parent target" by target command. With devtools.browsertoolbox.fission set to true, we will try to listen to all targets, including service workers. This throws because we are missing the necessary actors on the server-side.
This was regressed by Bug 1714395, where we changed the logic used in target-command to compute the target types (switched from targetFront.isParentProcess to targetDescriptor.isParentProcessDescriptor).
_computeTargetTypes() {
let types = [];
if (this.descriptorFront.isLocalTab) {
types = [TargetCommand.TYPES.FRAME];
} else if (this.descriptorFront.isParentProcessDescriptor) {
const fissionBrowserToolboxEnabled = Services.prefs.getBoolPref(
BROWSERTOOLBOX_FISSION_ENABLED
);
if (fissionBrowserToolboxEnabled) {
types = TargetCommand.ALL_TYPES;
}
}
// ...
}
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
Testing this in automation is not easy, but I suggest we add this to our devtools release tasks to avoid such issues being unnoticed for too long. This is broken since 91 cycle.
Assignee | ||
Comment 5•2 years ago
|
||
Updated•2 years ago
|
Comment 6•2 years ago
|
||
Set release status flags based on info from the regressing bug 1714395
Comment 7•2 years ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #4)
I suggest we add this to our devtools release tasks to avoid such issues being unnoticed for too long.
Ah yes, good idea! I'll update the doc and the template in the meta bug
Assignee | ||
Comment 8•2 years ago
|
||
thanks Nicolas! Clearing the ni for Alex since we are already working on a patch
Updated•2 years ago
|
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/710c7e460146 [devtools] Do not treat xpcshell targets as parent process targets r=ochameau,nchevobbe
Comment 10•2 years ago
|
||
bugherder |
Comment 11•2 years ago
|
||
The patch landed in nightly and beta is affected.
:jdescottes, is this bug important enough to require an uplift?
If not please set status_beta
to wontfix
.
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Assignee | ||
Comment 12•2 years ago
|
||
fwiw, this issue only happens when a certain preference is set to true, which is only the case by default on Nightly. So very little reason to uplift this.
Updated•2 years ago
|
Description
•