New issue
Advanced search Search tips

Issue 734555 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Chromium 58.0.3029.110 unable to parse --proxy-server format when running in headless mode

Reported by nickri...@gmail.com, Jun 19 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240

Steps to reproduce the problem:
1. Run `chromium-browser --headless --disable-gpu --user-data-dir=$(pwd)/chrome-data --remote-debugging-port=9222 --proxy-server="socks://127.0.0.1:1080" https://www.chromestatus.com`

What is the expected behavior?
Start without any error and use the proxy I specified.

What went wrong?
[0619/210210.402682:ERROR:headless_shell.cc(484)] Malformed proxy server url

Did this work before? N/A 

Chrome version: 58.0.3029.110  Channel: stable
OS Version: 
Flash Version:
 
Components: Internals>Network>Proxy
Labels: Needs-Feedback
"Malformed proxy server url" sounds like a the proxy server specified in a wrong format. The code was expecting to get a host port pair split by ':'. 

  if (command_line.HasSwitch(switches::kProxyServer)) {
    std::string proxy_server =
        command_line.GetSwitchValueASCII(switches::kProxyServer);
    net::HostPortPair parsed_proxy_server =
        net::HostPortPair::FromString(proxy_server);      <---- expecting a host port pair
    if (parsed_proxy_server.host().empty() || !parsed_proxy_server.port()) {
      LOG(ERROR) << "Malformed proxy server url";
      return EXIT_FAILURE;
    }
    builder.SetProxyServer(parsed_proxy_server);
  }


nickriose@: could you retry by specifying a custom proxy configuration in the following ways:

--proxy-server=<scheme>=<uri>[:<port>][;...] | <uri>[:<port>] | "direct://"

In particular, if I read your customized proxy configuration correctly: you probably should use --proxy-server="socks=127.0.0.1:1080"

More details and examples are available at https://www.chromium.org/developers/design-documents/network-settings

Comment 2 by nickri...@gmail.com, Jun 19 2017

Thank you for responding.

Yes, I saw the code before creating this feedback. 

However, the `man chromium-browser` states:

       --proxy-server=host:port
              Specify  the  HTTP/SOCKS4/SOCKS5  proxy server to use for requests.
......
                --proxy-server="socks://foobar:1080"
                    Use the SOCKS v5 proxy "foobar:1080" to load all URLs.
......

I think this is a little misleading, as this format is invalid for `--headless` mode. Maybe I should category this issues as a *Incorrect Document*
Project Member

Comment 3 by sheriffbot@chromium.org, Jun 19 2017

Cc: zhongyi@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "zhongyi@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 4 by eroman@chromium.org, Jun 20 2017

I don't know anything about the headless mode, but looks like it is implementing a completely different meaning for --proxy-server in headless/app/headless_shell.cc.

So yeah, --proxy-server works differently in headless than in regular chromium, which I agree is undesirable and seems broken.

Comment 5 by mmenke@chromium.org, Jun 20 2017

Components: Internals>Headless
Cc: -zhongyi@chromium.org

Comment 7 by pmarko@chromium.org, Jun 23 2017

Components: -Enterprise
Removing Enterprise label because this doesn't seem to be enterprise / policy specific. Please re-add it if you think I'm wrong. Thanks.
Labels: Needs-Milestone

Comment 9 by ajha@chromium.org, Jun 30 2017

Cc: ajha@chromium.org
Labels: -Needs-Milestone Proj-Headless M-61
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on the reported chromium version 58.0.3029.110 on Linux Ubuntu 14.04.

Marking this Untriaged and adding proper component for someone from the respective team to have a look at this.


Status: Fixed (was: Untriaged)
More complex proxy server strings for the headless mode should be supported in the latest M61 builds. The behavior was added here: https://chromium-review.googlesource.com/c/567008/.

Sign in to add a comment