Closed Bug 1720676 Opened 3 years ago Closed 3 years ago

Don't run Remote Agent specific code when --remote-debugging-port hasn't been specified

Categories

(Remote Protocol :: Agent, defect, P2)

Firefox 91
defect
Points:
8

Tracking

(firefox-esr78 unaffected, firefox90 unaffected, firefox91 wontfix, firefox92 fixed)

RESOLVED FIXED
92 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox90 --- unaffected
firefox91 --- wontfix
firefox92 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [bidi-m1-mvp])

Attachments

(2 files)

Ideally the component shouldn't be available at all when --remote-debugging-port hasn't been specified. But right now the command line handling code sits in the Rust Remote Agent component, and automatically creates the JSM equivalent.

Given that this isn't an easy change we should make sure to not run any code that is related to Remote Agent if it's not explicitly enabled via the command line argument.

This implies:

I would like to propose this for M1 which makes it much easier to handle the state of the Remote Agent.

Whiteboard: [webdriver:triage]
Points: 2 → ---

Discussed with Julian on Element and we are going to add this to the M1 list given that it is a regression from two M1 releated fixes.

Points: --- → 8
Whiteboard: [webdriver:triage] → [bidi-m1-mvp]
Blocks: 1689867
Blocks: 1600139
Depends on: 1722718

By implementing the command line handling and the
printing to stderr in the JS module of the Remote
Agent, the Rust implementation is no longer necessary.

This change allows the JS component to hold each detail
about the Remote Agent's status. Also it doesn't
require a full build anymore when changes are needed.

Depends on D121095

CC'ing Geoff to let him know about upcoming build config changes for Marionette.

Thanks whimboo, I'll make another bug or this could get messy.

Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f915c04b9c35
[marionette] Move component registration into components.conf. r=webdriver-reviewers,jdescottes
https://hg.mozilla.org/integration/autoland/rev/93a9c870d3d8
[remote] Remove Remote Agent's Rust implementation. r=webdriver-reviewers,jdescottes

Backed out for remote fails on browser_agent.js

[task 2021-07-29T18:04:56.592Z] 18:04:56     INFO - TEST-PASS | remote/cdp/test/browser/component/browser_agent.js | remote-listening observer notified enabled state - 
[task 2021-07-29T18:04:56.593Z] 18:04:56     INFO - Buffered messages finished
[task 2021-07-29T18:04:56.593Z] 18:04:56     INFO - TEST-UNEXPECTED-FAIL | remote/cdp/test/browser/component/browser_agent.js | remote-listening observer notified disabled state - Got null, expected "false"
[task 2021-07-29T18:04:56.593Z] 18:04:56     INFO - Stack trace:
[task 2021-07-29T18:04:56.593Z] 18:04:56     INFO - chrome://mochikit/content/browser-test.js:test_is:1371
[task 2021-07-29T18:04:56.593Z] 18:04:56     INFO - chrome://mochitests/content/browser/remote/cdp/test/browser/component/browser_agent.js:remoteListeningNotification:68
[task 2021-07-29T18:04:56.594Z] 18:04:56     INFO - Leaving test bound remoteListeningNotification
[task 2021-07-29T18:04:56.594Z] 18:04:56     INFO - Entering test bound listenTakesString
[task 2021-07-29T18:04:56.595Z] 18:04:56     INFO - GECKO(3728) | DevTools listening on ws://localhost:50118/devtools/browser/066e2f3c-6204-4f5b-a0d8-44846dca8193
[task 2021-07-29T18:04:56.595Z] 18:04:56     INFO - GECKO(3728) | WebDriver BiDi listening on ws://localhost:50118
[task 2021-07-29T18:04:56.595Z] 18:04:56     INFO - GECKO(3728) | 1627581896470	RemoteAgent	DEBUG	Resetting recommended pref browser.contentblocking.features.standard
[task 2021-07-29T18:04:56.596Z] 18:04:56     INFO - GECKO(3728) | 1627581896470	RemoteAgent	DEBUG	Resetting recommended pref network.cookie.cookieBehavior
[task 2021-07-29T18:04:56.596Z] 18:04:56     INFO - Leaving test bound listenTakesString
[task 2021-07-29T18:04:56.597Z] 18:04:56     INFO - Entering test bound listenNonURL
[task 2021-07-29T18:04:56.597Z] 18:04:56     INFO - TEST-PASS | remote/cdp/test/browser/component/browser_agent.js | undefined assertion name -
Flags: needinfo?(hskupin)

The linter suggested to remove false as third argument for Services.obs.notifyObservers(). That means callbacks of the remote-listening observer listener will receive null now.

Flags: needinfo?(hskupin)
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b58937c59f63
[marionette] Move component registration into components.conf. r=webdriver-reviewers,jdescottes
https://hg.mozilla.org/integration/autoland/rev/3c2599c00332
[remote] Remove Remote Agent's Rust implementation. r=webdriver-reviewers,jdescottes
Blocks: 1719505

Problem here is that we register the quit-application only when the --remote-debugging-port argument has been specified, but Mochitests don't do that and as such we leak the running httpd.js server, and several other parts of the Remote Agents code base. Fix for that will follow soon.

Flags: needinfo?(hskupin)
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/36fe2def8460
[marionette] Move component registration into components.conf. r=webdriver-reviewers,jdescottes
https://hg.mozilla.org/integration/autoland/rev/5c01aa328586
[remote] Remove Remote Agent's Rust implementation. r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
See Also: → 1682845
Regressions: 1724028
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: