Org openqa selenium webdriverexception unknown error failed to create chrome process

Итак, я пытался создать программу, которая может взаимодействовать с веб-страницей для ввода данных

Итак, я пытался создать программу, которая может взаимодействовать с веб-страницей для ввода данных. В идеале я хотел использовать Chrome, поэтому я попытался настроить Selenium WebDriver и ChromeDriver.

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class Chrome {

public static void main(String[] args) {

    //Set chromedriver path
    System.setProperty("webdriver.chrome.driver","C:/Users/Username/Desktop/Comp Sci work/chromedriver.exe");

    WebDriver driver = new ChromeDriver();

     // Open Google
    driver.get("http://www.google.com");

    // Maximize browser
    driver.manage().window().maximize();

}
}

Кажется, я правильно настроил внешние JAR, так как могу без проблем их импортировать. Проблема в том, что по какой-то причине процесс Chrome не может быть создан. Я думал, что это могло быть потому, что уже был открыт процесс Chrome, но нет. У меня все еще была та же ошибка, когда я убил процесс.

Затем я попытался сбросить путь к Chrome, так как по умолчанию он мог отличаться от моего, но все равно не повезло.

public class Chrome {

public static void main(String[] args) {

    //Set chromedriver path
    System.setProperty("webdriver.chrome.driver","C:/Users/Username/Desktop/Comp Sci work/chromedriver.exe");

    ChromeOptions options = new ChromeOptions();
    options.setBinary("C:\Users\Username\AppData\Local\Google\Chrome\Application\chrome.exe");

    WebDriver driver = new ChromeDriver();

     // Open Google
    driver.get("http://www.google.com");

    // Maximize browser
    driver.manage().window().maximize();

}
}

Сообщение об ошибке:

Starting ChromeDriver 2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e) 
on port 43997
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown 
error: Failed to create a Chrome process.
(Driver info: chromedriver=2.41.578737 
(49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 10.0.17134 
x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 199 milliseconds
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08- 
02T20:05:20.749Z'

Поскольку хромированная насадка, кажется, запускается нормально, проблема заключается просто в создании процесса хромирования, но я не могу понять, почему. Любая помощь будет принята с благодарностью (а также советы по форматированию моего сообщения, так как это мой первый пост). Спасибо

Hello Guys, How are you all? Hope You all Are Fine. Today I am just trying to use selenium webdriver but  the browser instance just doesn’t launch and give me following error selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

Contents

  1. How selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed Error Occurs ?
  2. How To Solve selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed Error ?
  3. Solution 1: download chrome driver version that equal to your chrome version
  4. Solution 2: Use this solution
  5. Summary

I am just trying to use selenium webdriver but  the browser instance just doesn’t launch and give me following error.

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
  (Driver info: chromedriver=2.43.600233, platform=Linux 4.15.0-38-generic x86_64)

How To Solve selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed Error ?

  1. How To Solve selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed Error ?

    To Solve selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed Error First of all check your chrome browser Version. Now just download chrome driver version that equal to your chrome version from here. Now just use following code.

  2. selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed

    To Solve selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed Error First of all check your chrome browser Version. Now just download chrome driver version that equal to your chrome version from here. Now just use following code.

Solution 1: download chrome driver version that equal to your chrome version

First of all check your chrome browser Version. Now just download chrome driver version that equal to your chrome version from here. Now just use following code.

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
d = webdriver.Chrome('your-chrome-driver-path',chrome_options=chrome_options)
d.get('https://www.google.nl/')

Solution 2: Use this solution

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.binary_location = "C:\path\to\your\chrome.exe"    #chrome binary location specified here
options.add_argument("--start-maximized") #open Browser in maximized mode
options.add_argument("--no-sandbox") #bypass OS security model
options.add_argument("--disable-dev-shm-usage") #overcome limited resource problems
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(options=options, executable_path=r'C:pathtochromedriver.exe')
driver.get('http://google.com/')

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

  • WebDriverException: unknown error: cannot find Chrome binary error with Selenium in Python for older versions of Google Chrome

Issue

Chrome is not stable on my Jenkins. When I run build 5 times, it runs 1 — 2-time success, and the other 3 times I have the above error.

Snapshot of the error:
src=»https://i.stack.imgur.com/ansgc.png» alt=»enter image description here» />

Code for Chrome :

ChromeOptions options = new ChromeOptions();
System.setProperty("webdriver.chrome.driver","/usr/local/bin/chromedriver");
options.addArguments("--headless");
options.addArguments("--no-sandbox");
options.addArguments("--disable-dev-shm-usage");
driver = new ChromeDriver(options);
driver.get("https://mywebsite.com");
     

Some steps I have already taken :

  1. Provided 777 permission to google chrome and chrome driver

  2. Set : Start Xvfb before the build, and shut it down after to True in Jenkins build setting
    enter image description here

  3. ChromeDriver 81.0.4044.69

  4. Google Chrome 81.0.4044.129

  5. Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-99-generic x86_64)

Solution

This error message…

snapshot

…implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.


Deep dive

Looking into the snapshot of the error stacktrace you have provided, though you mentioned about using ChromeDriver 81.0.4044.69 and Google Chrome 81.0.4044.129, still it appears there is a mismatch between the versions of the different binaries you are using, possibly Chrome browser is not installed at the default location within your system or due to JDK mismatch. Additionally, ChromeDriver 81.0.4044.69 (2020-03-17) was a bit unstable which was replaced by ChromeDriver 81.0.4044.138 (2020-05-05)

However, the server i.e. ChromeDriver expects you to have Chrome installed in the default location for each system as per the image below:

Chrome_binary_expected_location

1For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary.

You can find a detailed discussion in What is default location of ChromeDriver and for installing Chrome on Windows


Solution

In case you are using the Chrome executable in a non-standard location you have to override the Chrome binary location as follows:

  • Code based solution:

    System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
    ChromeOptions options = new ChromeOptions();
    options.setBinary('/usr/bin/google-chrome');    //chrome binary location
    options.addArguments("--headless");
    options.addArguments("--no-sandbox");
    options.addArguments("--disable-dev-shm-usage");
    WebDriver driver = new ChromeDriver(options);
    driver.get("https://www.google.com/");
    //execute the remaining steps
    driver.quit();
    
  • Additional considerations- Ensure the following:

    • JDK is upgraded to current levels JDK 8u251.
    • Selenium is upgraded to current levels Version 3.141.59.
    • ChromeDriver is updated to current ChromeDriver v81.0.4044.138 level.
    • Chrome is updated to current Chrome Version 81.0.4044.138 level. (as per ChromeDriver v80.0 release notes)
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • Execute your @Test as non-root user.
    • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

References

You can find a couple of relevant discussions in:

  • WebDriverException: unknown error: DevToolsActivePort file doesn’t exist while trying to initiate Chrome Browser
  • How to configure ChromeDriver to initiate Chrome browser in Headless mode through Selenium?
  • Running Chromedriver on Ubuntu Server headlessly

Answered By — undetected Selenium
Answer Checked By — Dawn Plyler (JavaFixing Volunteer)

Dean Blechman

unread,

Apr 27, 2016, 4:56:12 PM4/27/16

to Selenium Users

Hi

I have a Java script that runs tests automatically on a daily basis. I added a test that uses Selenium, and when it calls «WebDriver driver = new ChromeDriver()» it fails with the following error.

However when I run the test manually, the error does not reproduce.

Selenium version is 2.49.1, Chrome is up to date. 

Any ideas what could be the problem?

27-04-2016 07:39:13 org.openqa.selenium.WebDriverException:unknown error: unable to discover open pages
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 63.87 seconds
Build info: version: ‘2.24.1’, revision: ‘17205’, time: ‘2012-06-19 16:53:24’
System info: os.name: ‘Windows Server 2008 R2’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_66’
Driver info: driver.version: ChromeDriver
Session ID: db858e0e720d15d82c6a4a9da6d90eef 
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422) 
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188) 
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145) 
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:472) 
      at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:155) 
      at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:107) 
      at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:165) 
      at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107) 

⇜Krishnan Mahadevan⇝

unread,

Apr 27, 2016, 4:58:22 PM4/27/16

to Selenium Users

Dean,

You are not on Selenium 2.49. Your stacktrace seems to suggest that you seem to be running on a very old version of Selenium [ Build info: version: ‘2.24.1’, revision: ‘17205’, time: ‘2012-06-19 16:53:24’ ]

Please upgrade to the latest version and try again.

Ripon Al Wasim

unread,

Apr 28, 2016, 7:50:48 AM4/28/16

to seleniu…@googlegroups.com

System.setProperty(«webdriver.chrome.driver», «D:\Ripon\chromedriver.exe»);

driver = new ChromeDriver();

Dean Blechman

unread,

May 1, 2016, 9:33:42 AM5/1/16

to Selenium Users

Wow. You’re right of course, I don’t know how I missed that. I’ll upgrade and see if that solves it.

Dean Blechman

unread,

May 2, 2016, 1:24:53 PM5/2/16

to Selenium Users

I updated Selenium, but got the same result.

02-05-2016 09:32:20 org.openqa.selenium.WebDriverException:unknown error: unable to discover open pages

(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 61.86 seconds
Build info: version: ‘2.49.1’, revision: ‘808c23b0963853d375cbe54b90bbd052e2528a54’, time: ‘2016-01-21 09:37:52’
System info: host: ‘IP-0A00030F’, ip: ‘10.0.3.15’, os.name: ‘Windows Server 2008 R2’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_66’
Driver info: org.openqa.selenium.chrome.ChromeDriver 

      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422) 

      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) 
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) 
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) 
      at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249) 
      at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131) 
      at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144) 
      at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170) 
      at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159) 
      at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116) 

ajahar mohd

unread,

May 2, 2016, 6:29:01 PM5/2/16

to Selenium Users

Dean Blechman

unread,

May 3, 2016, 10:14:48 AM5/3/16

to Selenium Users

Thanks for answering Ajahar, but as you can see in the trace, the chromedriver is up to date.

David Ignjić

unread,

May 26, 2016, 9:50:17 PM5/26/16

to Selenium Users

Today happen also for me but just update chrome and java ;-/

David Ignjić

unread,

May 26, 2016, 9:55:06 PM5/26/16

to Selenium Users

SO i solved in that way that i change windows service to run on real user and then problem disapear.

Rajasekaran R

unread,

May 31, 2016, 12:31:06 PM5/31/16

to Selenium Users

I have found the solution for this issue. it is working fine for me.

If you are using windows, run your Jenkins services in system admin,

1. open to run cmd
2. Enter service and click Okay button
3. A service dialog box open, locate Jenkins services. Go to properties of service
4. Go to logon tab, choose the second option. provide the your admin user not the local server
5. then restart the services.

This will work

Shabana Parveen

unread,

Jun 6, 2016, 10:18:35 AM6/6/16

to Selenium Users

I tried all solution, but still getting same issue, please help.

⇜Krishnan Mahadevan⇝

unread,

Jun 6, 2016, 10:23:07 AM6/6/16

to Selenium Users

Shabana,

You haven’t told us much about what your setup looks like. So can you please add some context around the following aspects :

* What does your setup look like [ Include version info of ChromeDriver, chrome browser, selenium version, OS flavor and version ]

* How do you run a typical test on chrome. Please make sure you share code snippets etc.,

* What all have you tried so far.

Shabana Parveen

unread,

Jun 6, 2016, 10:34:59 AM6/6/16

to Selenium Users

Hi,

Thanks for quick reply, well I m using Maven project in which I mentioned latest selenium version dependency, Chrome version I m using chromedriver_win32.zip2016-06-04 20:51:192.61MB c5962f884bd58987b1ef0fa04c6a3ce5; 

I used a BeforeSuit function, In which I mentioned below code:

System.setProperty(«webdriver.chrome.driver», «C://Users//f2849//AppData//Local//Google//Chrome//Application//chromedriver.exe»);

// System.setProperty(«webdriver.chrome.driver», «C://Program Files (x86)//Google//Chrome//Application//chromedriver.exe»);

driver = new ChromeDriver();

// driver = new FirefoxDriver();

driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);

driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);

driver.manage().deleteAllCookies();

driver.manage().window().maximize();


Shabana Parveen

unread,

Jun 6, 2016, 10:37:18 AM6/6/16

to Selenium Users

Also, My project is perfectly working fine on local, but it showing error while I run my framework on Jenkins.  

⇜Krishnan Mahadevan⇝

unread,

Jun 6, 2016, 10:43:13 AM6/6/16

to Selenium Users

Shabana,

This was why I was stating that you please add more context. Your code snippet suggests that you are trying to work with a Windows environment, but you say that you are trying to run on Jenkins.

Please add as much context as you can to describe your problem.

Shabana Parveen

unread,

Jun 6, 2016, 12:07:22 PM6/6/16

to Selenium Users

Basically,

I run my Maven project(which is configured via GitHub ) on Jenkins which is on Amazon cloud (Which provide Windows VM)

On Amazon Cloud, I have updated my ChromeDriver, Also I tried to Reset my Jenkins services.

Anything you required, Please let me know.

Thanks,

Shabana Parveen

Krishnan Mahadevan

unread,

Jun 6, 2016, 12:10:05 PM6/6/16

to Selenium Users

Rajasekaran R

unread,

Jun 6, 2016, 12:23:27 PM6/6/16

to Selenium Users

Hi All,

Please run you jenkins in administrator mode. This will solve your problem. I’m sure about it.

This problem occurs when jenkins installed in some VM (Remote) machines. because, that machine is not running on admin mode. It is running with local mode.

Switch that mode, will resolve this problem.

Thanks,

Raj R

Shabana Parveen

unread,

Jun 6, 2016, 12:23:49 PM6/6/16

to Selenium Users

Yes, manually Its working fine, doesn’t provide any stacktrack information. Below is error I got:

Starting ChromeDriver 2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b) on port 22509
Only local connections are allowed.
Tests run: 502, Failures: 1, Errors: 0, Skipped: 501, Time elapsed: 65.255 sec <<< FAILURE! - in TestSuite
test1_gotoSetUp(XXX_QA.FrontEndAutomation.Test_CP_BuySerive_withCredits)  Time elapsed: 63.773 sec  <<< FAILURE!
org.openqa.selenium.WebDriverException: 
unknown error: unable to discover open pages
  (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.95 seconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'XXXX', ip: 'XX.XX.XX.XX', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_40'
Driver info: org.openqa.selenium.chrome.ChromeDriver

Results :

Failed tests: 
  Test_CP_BuySerive_withCredits>Run.test1_gotoSetUp:95 » WebDriver unknown error...

Tests run: 210, Failures: 1, Errors: 0, Skipped: 209


Shabana Parveen

unread,

Jun 6, 2016, 12:25:34 PM6/6/16

to Selenium Users

Its a 64 bit machine as well.

Shabana Parveen

unread,

Jun 6, 2016, 12:32:58 PM6/6/16

to Selenium Users

My project was perfectly working fine till yesterday, from today morning I got the error on Jenkins.

El miércoles, 27 de abril de 2016, 19:26:12 (UTC+5:30), Dean Blechman escribió:

Shabana Parveen

unread,

Jun 6, 2016, 3:11:39 PM6/6/16

to Selenium Users

Thanks Rajasekaran, Now its working after giving Administrative rights to Jenkins.

Ivan Trechyokas

unread,

Jun 7, 2016, 10:37:22 PM6/7/16

to Selenium Users

We also have same problems, but it depends on OS where test runs. We have Windows, and last Chrome driver and browser are used.

org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages

  (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 61.05 seconds

Build info: version: ‘2.53.0’, revision: ’35ae25b1534ae328c771e0856c93e187490ca824′, time: ‘2016-03-15 10:43:46’

System info: host: ‘w10’, ip: ‘192.168.110.10’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_25’
Driver info: org.openqa.selenium.chrome.ChromeDriver
selenide.url: https://rc.semrush.net
selenide.baseUrl: https://rc.semrush.net

org.openqa.selenium.WebDriverException: 
unknown error: unable to discover open pages

  (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 61.05 seconds

Build info: version: ‘2.53.0’, revision: ’35ae25b1534ae328c771e0856c93e187490ca824′, time: ‘2016-03-15 10:43:46’

System info: host: ‘w10’, ip: ‘192.168.110.10’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_25’
Driver info: org.openqa.selenium.chrome.ChromeDriver
selenide.url: https://rc.semrush.net
selenide.baseUrl: https://rc.semrush.net
    at com.semrush.testSuits.BrowserManager.openBrowser(BrowserManager.java:19)
——- Stderr: ——-
SLF4J: Failed to load class «org.slf4j.impl.StaticLoggerBinder».
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting ChromeDriver 2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b) on port 44132

Only local connections are allowed.

For avoiding this problem we add this option for driver.

ChromeOptions options = new ChromeOptions();
               options.addArguments(«no-sandbox»);

pawat…@gmail.com

unread,

Jun 10, 2016, 2:10:02 PM6/10/16

to Selenium Users

Thanks, Ivan Trechyokas

Adding

  capabilities: {

    browserName: ‘chrome’,

    chromeOptions: {

      args: [‘—no-sandbox’]

    },

to my Protractor configuration file solved the problem.

Soumya Balakrishnan

unread,

Jun 20, 2016, 9:46:42 PM6/20/16

to Selenium Users

Hey Shabana, 

I have a very similar issue as you. I have the job running on one of windows slaves and I get this same error. But when I log into the slave and run the test it passes.

I wanted to check with you regarding what you meant by «its working after giving Administrative rights to Jenkins» -> how did you do that?

Thanks

Sindhu Kumar S

unread,

Jun 22, 2016, 9:12:52 AM6/22/16

to Selenium Users

What need to be done to make it work? Im on Win 7 running script via Jenkins CI.
If change running the Jenkins service in windows as Admin, then i cant lauch Jenkins via browser, receiving error 503.

qzhan…@gmail.com

unread,

Jun 29, 2016, 8:15:44 AM6/29/16

to Selenium Users

Hi All,

 My problem is :when I start the tomcat using bintomcate7.exe, there is no error.But when I add tomcat to windows services, then start the tomcat service,the error message  as bellow :

Caused by: org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages

  (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 60.68 seconds

Build info: version: ‘2.48.2’, revision: ’41bccdd10cf2c0560f637404c2d96164b67d9d67′, time: ‘2015-10-09 13:08:06’

System info: host: ‘CDCH20120026-06’, ip: ‘10.60.201.20’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_77’

Driver info: org.openqa.selenium.chrome.ChromeDriver

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)

at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)

at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247)

at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)

at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)

at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)

at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)

Sarvjeet Kumar Singh

unread,

Jul 5, 2016, 10:50:20 AM7/5/16

to Selenium Users

Hi Shabana, 

I also have a very similar issue as you. My project runs fine from my local eclipse as maven project on both firefox and chrome. When i run from jenkin on firefox it works perfectly however on chrome it fails. I am using sellinium chrme driver 2.53.0 and maven 3.3. my repo is on bitbucket.

I wanted to check with you regarding what you meant by «its working after giving Administrative rights to Jenkins» -> how did you do that?

On Wednesday, April 27, 2016 at 7:26:12 PM UTC+5:30, Dean Blechman wrote:

Hi

I have a Java script that runs tests automatically on a daily basis. I added a test that uses Selenium, and when it calls «WebDriver driver = new ChromeDriver()» it fails with the following error.

However when I run the test manually, the error does not reproduce.

Selenium version is 2.49.1, Chrome is up to date. 

Any ideas what could be the problem?

27-04-2016 07:39:13 org.openqa.selenium.WebDriverException:unknown error: unable to discover open pages
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 63.87 seconds
Build info: version: ‘2.24.1’, revision: ‘17205’, time: ‘2012-06-19 16:53:24’
System info: os.name: ‘Windows Server 2008 R2’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_66’
Driver info: driver.version: ChromeDriver
Session ID: db858e0e720d15d82c6a4a9da6d90eef 

      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 

Sarvjeet Kumar Singh

unread,

Jul 9, 2016, 11:30:49 AM7/9/16

to Selenium Users

My problem is solved after adding  chromeOptions.AddArguments(«no-sandbox»);

Thanks.

joan.s…@gttsupport.com

unread,

Jul 19, 2016, 7:14:05 PM7/19/16

to Selenium Users

That worked for me! Thanks!

niyaz hashmi

unread,

Jul 26, 2016, 3:00:43 PM7/26/16

to Selenium Users

Hi ,

I am facing the same issue the scripts are working fine on my local system but when the framework is running on Jenkins it is throwing «unknown error:Unable to discover open pages’.

Environment Details:

JDK: 1.8

Selenium:2.53.1

Chrome Browser:52.0

Chrome driver:2.21

Please tell me the resolution for this issue.

Regards,

Niyaz

Robins Mathew

unread,

Jul 26, 2016, 4:31:16 PM7/26/16

to Selenium Users

I faced the same issue. 

Revert your chrome version to 51. It will resolve the issue for the time being.

Something went wrong with the release of Google Chrome 52

robert…@ambab.com

unread,

Jul 26, 2016, 4:43:34 PM7/26/16

to Selenium Users

Add this in your script. It will solve the issue that your facing.

ChromeOptions options = new ChromeOptions();
options.addArguments(«no-sandbox»);

Like this:

if (strBrowserType[i].toString().equalsIgnoreCase(«chrome»)) {

System.setProperty(«webdriver.chrome.driver», strBrowserPath[i]+»Drivers/chromedriver.exe»);

ChromeOptions options = new ChromeOptions();

options.addArguments(«no-sandbox»);

driver = new ChromeDriver();

If you have any more doubt’s you can ping me here itself. I’ll be more then happy to help :)

Robins Mathew

unread,

Jul 26, 2016, 4:48:11 PM7/26/16

to Selenium Users

Hi Robert,

Do you have any idea what does «no-sandbox» means exactly?

What can be the reason for this to happen in the new version of chrome?

Is it advisable to use «no-sandbox»?

What i have seen is

allow-no-sandbox-job Enables the sandboxed processes to run without a job object assigned to them. This flag is required to allow Chrome to run in RemoteApps or Citrix. This flag can reduce the security of the sandboxed processes and allow them to do certain API calls like shut down Windows or access the clipboard. Also we lose the chance to kill some processes until the outer job that owns them finishes. ↪

Shabana Parveen

unread,

Aug 9, 2016, 8:19:42 AM8/9/16

to Selenium Users

On Tuesday, July 5, 2016 at 1:20:20 PM UTC+5:30, Sarvjeet Kumar Singh wrote:

Sarvjeet Kumar Singh

unread,

Aug 9, 2016, 8:37:17 AM8/9/16

to seleniu…@googlegroups.com

Thanks Shabana for the help. Appreciate it.

Priya Kharb

unread,

Aug 9, 2016, 9:34:38 AM8/9/16

to Selenium Users

Hello Sarvjeet,

I tried below mentioned solution but still i am facing same issue:

1. I have updated ChromeDriver exe.

2. Add below code snippet:

ChromeOptions options = new ChromeOptions();

options.addArguments(«test-type»);

options.addArguments(«start-maximized»);

options.addArguments(«—disable-extensions»);

options.addArguments(«no-sandbox»);

3. Also provide admin permission to Jenkins Service,I access Jenkin remotely.

Logs:

Running XXXXSuite
Starting ChromeDriver 2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b) on port 22600
Only local connections are allowed.
Tests run: 494, Failures: 1, Errors: 0, Skipped: 493, Time elapsed: 66.093 sec <<< FAILURE! - in TestSuite
test1_XXX  Time elapsed: 64.381 sec  <<< FAILURE!
org.openqa.selenium.WebDriverException: 
unknown error: unable to discover open pages
  (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.92 seconds
Build info: version: 'unknown', revision: '31c43c8', time: '2016-08-02 21:57:56 -0700'
System info: host: 'XXX', ip: '10.130.94.20', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_40'
Driver info: org.openqa.selenium.chrome.ChromeDriver

Results :

Failed tests: 
  Test_XXX » WebDriver unknown erro...

Tests run: 206, Failures: 1, Errors: 0, Skipped: 205

Thanks,
Priya Kharb

Sarvjeet Kumar Singh

unread,

Aug 9, 2016, 9:46:39 AM8/9/16

to seleniu…@googlegroups.com

@Priya, Can you try adding below code as well and check.

DesiredCapabilities capabilities = DesiredCapabilities.chrome();

options.addArguments(«ignore-certificate-errors»); 

options.addArguments(«—allow-running-insecure-content»);

capabilities.setCapability(«chrome.binary», chromeDriverPath);

capabilities.setCapability(ChromeOptions.CAPABILITY, options);

Priya Kharb

unread,

Aug 9, 2016, 12:08:19 PM8/9/16

to Selenium Users

@Sarvjeet,

Thank you so much for quick reply.

It woks for me…:-)

Thanks,

Priya Kharb

Sarvjeet Kumar Singh

unread,

Aug 9, 2016, 12:15:11 PM8/9/16

to seleniu…@googlegroups.com

You welcome Priya :) Great to know that it worked.

Cameron Spencer

unread,

Aug 15, 2016, 7:38:40 PM8/15/16

to Selenium Users

Hey, I seem to have the same issue but none of the steps in this thread have worked for me. As previously mentioned, this is only an issue when I try to run the commands through Jenkins 

Jenkins 2.16

Windows 7 x64

Chrome Driver  2.23.409699

Selenium 2.53.1

Java 1.8.0_60

Here are my current Chrome driver options

ChromeOptions options = new ChromeOptions();
options
.addArguments("test-type");
options
.addArguments("start-maximized");
options
.addArguments("--disable-extensions");
options
.addArguments("no-sandbox");


options
.addArguments("ignore-certificate-errors");
options
.addArguments("--allow-running-insecure-content");

DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("chrome.binary", WINDOWS_CHROME_DRIVER);
capabilities
.setCapability(ChromeOptions.CAPABILITY, options);WebDriver driver = new ChromeDriver();

The command I use

mvn exec:java -Dexec.args="%RESULT_DIR%"

OUTPUT:

Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 30083
Only local connections are allowed.
[WARNING] 
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages
  (Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.71 seconds
Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
System info: host: 'td-beefcake', ip: '192.168.214.43', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.chrome.ChromeDriver
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)

Cameron Spencer

unread,

Aug 15, 2016, 8:09:04 PM8/15/16

to Selenium Users

Now I get to look silly. My problem was resolved when I realized I never passed in  ‘options’to the ChromeDriver constructor.

WebDriver driver = new ChromeDriver(options);

PePan

unread,

Aug 16, 2016, 6:39:57 PM8/16/16

to Selenium Users

Hi,

I got to very same issue. After the Chrome has upgraded to v52, my Selenium tests started to fail. I have been using chromedriver 2.21 on Windows and my Jenkins was already running under a local (non-admin) user. I tried all the suggested tricks here — upgraded chromedriver to 2.23; restarted Jenkins service under local Administrator account; nothing helped. Finally, this only change helped:

In my Selenium test, I’ve changed this method 

    private static WebDriver driver;
   
@BeforeClass
   
public static void openBrowser() {
        driver
= new ChromeDriver();
        driver
.get(BASE_URL);
   
}

into

    private static WebDriver driver;
   
@BeforeClass
   
public static void openBrowser() {


       
ChromeOptions options = new ChromeOptions();


        options
.addArguments("no-sandbox");
        driver
= new ChromeDriver(options);
        driver
.get(BASE_URL);
   
}

And that helped. I have no clue why this is happening.

Thanks Ivan and Cameron!

Petr

Srujan Kumar

unread,

Oct 14, 2017, 8:32:05 AM10/14/17

to Selenium Users

Thanks a lot!!!!

This worked for me and saved a lot of thime :)  

Like this post? Please share to your friends:
  • Org openqa selenium webdriverexception unknown error cannot find chrome binary
  • Org freedesktop dbus error spawn childexited
  • Org apache log4j logger error
  • Oracle ошибка 12705
  • Oracle stream write error