Warning logged when using "--remote-allow-origins" or "--remote-allow-hosts"
Categories
(Remote Protocol :: Agent, defect, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned, Mentored)
References
Details
(Whiteboard: [lang=js])
Attachments
(1 file)
Passing those arguments to Firefox now results in a warning logged from https://searchfox.org/mozilla-central/rev/962a843f6d96283c45162c788dc72bf217fca7df/browser/components/BrowserContentHandler.sys.mjs#1245-1247
for (let i = 0; i < cmdLine.length; ++i) {
var curarg = cmdLine.getArgument(i);
if (curarg.match(/^-/)) {
console.error(
"Warning: unrecognized command line flag " + curarg + "\n"
);
// To emulate the pre-nsICommandLine behavior, we ignore
// the argument after an unrecognized flag.
++i;
} else {
try {
urilist.push(resolveURIInternal(cmdLine, curarg));
} catch (e) {
console.error(
"Error opening URI '" +
curarg +
"' from the command line: " +
e +
"\n"
);
}
}
}
remote-debugging-port
is not impacted, probably because of the code at https://searchfox.org/mozilla-central/rev/962a843f6d96283c45162c788dc72bf217fca7df/remote/components/RemoteAgent.sys.mjs#172-181:
handle(cmdLine) {
// remote-debugging-port has to be consumed in nsICommandLineHandler:handle
// to avoid issues on macos. See Marionette.jsm::handle() for more details.
// TODO: remove after Bug 1724251 is fixed.
try {
cmdLine.handleFlagWithParam("remote-debugging-port", false);
} catch (e) {
cmdLine.handleFlag("remote-debugging-port", false);
}
}
Adding similar code for the other command line arguments silences the warnings, but it would be nice to know if we should do something to properly declare those arguments or if this is just another macos timing issue for processing command line arguments (similar to Bug 1724251)
Comment 1•1 years ago
|
||
Hi Dave, would it be enough to just use handleFlagWithParam()
for our other command line flags or as Julian asked, do we have to register the arguments somewhere? Thanks!
Comment 2•1 years ago
|
||
(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #1)
Hi Dave, would it be enough to just use
handleFlagWithParam()
for our other command line flags or as Julian asked, do we have to register the arguments somewhere? Thanks!
That is probably the easiest solution right now
Comment 3•1 years ago
|
||
Thanks! Then we can do it that way.
I've also updated the summary of the bug so it refers to the correct arguments that we support for the Remote Agent.
Updated•1 years ago
|
Comment 4•3 months ago
|
||
cauasene00 will have a look at this bug as discussed on bug 1904310. Thank you for your interest.
Comment 5•3 months ago
|
||
Updated•3 months ago
|
Comment 6•3 months ago
|
||
Hi @cauasene00 I wanted to check back with you if you have issues updating the patch or just having less time to get it updated based on my review. Thanks!
Comment 7•2 months ago
|
||
I'm going to unassign this bug for now given that we didn't hear from cauasene00 over the last month. I'm happy to re-assign in case we get a reply and there is interest in continue the contribution.
Comment hidden (obsolete) |
I am using Mozilla Firefox 132.0.2 on Ubuntu 24.04.1 and I am unable to reproduce this issue.
I have tried the following commands in my terminal, and am not seeing the logged warning mentioned in this ticket:
- firefox --remote-debugging-port=9222 --remote-allow-origins=http://example.com
- firefox --remote-allow-origins=http://example.com
Am I not using the correct command when trying to reproduce this issue?
Thanks
Comment 10•9 days ago
|
||
The reason why you aren't seeing those failures is that by default these kind of logs are not printed to the console. Seeing you are commenting on this bug I assume you have an interest to contribute? If yes I would suggest that you first setup a clone of mozilla-central and get an artifact build of Firefox and then get it running via mach run
. With the latter command you can then easily see the mentioned warnings in the console output.
See https://firefox-source-docs.mozilla.org/testing/marionette/NewContributors.html in how to get started.
Reporter | ||
Comment 11•9 days ago
|
||
Note that this might be a macos only issue. I haven't checked on other operating systems, but similar bug 1724251 is macos only.
Description
•