New issue
Advanced search Search tips
Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue chromium:681521
Owner: ----
Closed: Jun 2017
Cc:



Sign in to add a comment

chromedriver with 'headless' oprtion and 'proxy-server' fails to start

Reported by alex.che...@gmail.com, Jun 9 2017

Issue description

Need to start chromedriver in headless mode with proxy server binding.
Please see the below code:
------------------------------------------------------------------------------------
 DesiredCapabilities capabilities = DesiredCapabilities.chrome();
        ChromeOptions options = new ChromeOptions();
        options.addArguments("--headless");
        options.addArguments("disable-gpu");

        BrowserMobProxyServer browserMobProxy = new BrowserMobProxyServer();
        browserMobProxy.start();
        Proxy seleniumProxy = ClientUtil.createSeleniumProxy(browserMobProxy);
        capabilities.setCapability(CapabilityType.PROXY, seleniumProxy);
        capabilities.setCapability(ChromeOptions.CAPABILITY, options);

        WebDriver driver = new ChromeDriver(capabilities);

        driver.get("https://www.google.com/ncr");
        driver.findElement(By.name("q"));
------------------------------------------------------------------------------------

This results in hanging with following log:
Starting ChromeDriver 2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262) on port 40741
Only local connections are allowed.

After a timeout the execution fails with the following error:
Exception in thread "main" org.openqa.selenium.NoSuchSessionException: no such session
  (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 10 milliseconds
Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000'
System info: host: 'my host here', ip: 'ip here', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{message=unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64), platform=ANY}]

Running the same code without 'headless' option enabled works just fine.

Also try setting proxy via: 

   options.addArguments("proxy-server=" + "<proxy address>");

But that didn't help.

Chrome version: 59.0.3071.86 (Official Build) (64-bit)
ChromeDriver version: 2.30
OS: Mac OS X 10.11.6
The same was on ChromeDriver version 2.29

Looks like an issue.
 
Project Member

Comment 1 by gmanikpure@chromium.org, Jun 12 2017

This issue looks related to https://bugs.chromium.org/p/chromium/issues/detail?id=697667
Project Member

Comment 2 by gmanikpure@chromium.org, Jun 12 2017

Status: Untriaged (was: Unconfirmed)
Project Member

Comment 3 by johnchen@chromium.org, Jun 16 2017

Cc: johnchen@chromium.org
Mergedinto: chromium:681521
Status: Duplicate (was: Untriaged)
This indeed looks like https://bugs.chromium.org/p/chromium/issues/detail?id=697667, which has been closed as a duplicate of https://bugs.chromium.org/p/chromium/issues/detail?id=681521. However, I can't confirm it since the original report didn't given the value of the proxy string.

alex.cherevatiy@gmail.com: I'm closing this as a duplicate of the bug mentioned above. If you believe this is incorrect, please re-open this bug, and attach a verbose log from ChromeDriver. Thanks.

Sign in to add a comment