'Unable to discover open pages" error when trying to create ChromeDriver

14,030 views
Skip to first unread message

Dean Blechman

unread,
Apr 27, 2016, 9:56:12 AM4/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, 9:58:22 AM4/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.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0e09b0d9-41e6-45ef-a5ce-a225f810cfaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ripon Al Wasim

unread,
Apr 28, 2016, 12: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, 2: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, 6:24:53 AM5/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, 11:29:01 AM5/2/16
to Selenium Users
Hey Dean,

This problem is due your outdated chromedriver go and get it updated http://chromedriver.storage.googleapis.com/index.html you can also fix it using this blog post : 

Dean Blechman

unread,
May 3, 2016, 3: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, 2: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, 2: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, 5:31:06 AM5/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, 3: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, 3: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.



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Shabana Parveen

unread,
Jun 6, 2016, 3: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, 3: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, 3: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.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Shabana Parveen

unread,
Jun 6, 2016, 5:07:22 AM6/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, 5:10:05 AM6/6/16
to Selenium Users

* What does your stack trace look like on your Jenkins job ?
* Have you tried manually spawning both chrome browser and chrome driver to make sure the setup is all fine on your Amazon cloud

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

El lunes, 6 de junio de 2016, 12:53:07 (UTC+5:30), Krishnan escribió:

To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/6f3dd1b4-9ce0-443b-8e6b-c757063ad4f0%40googlegroups.com.

Rajasekaran R

unread,
Jun 6, 2016, 5:23:27 AM6/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, 5:23:49 AM6/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, 5:25:34 AM6/6/16
to Selenium Users
Its a 64 bit machine as well.

Shabana Parveen

unread,
Jun 6, 2016, 5:32:58 AM6/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, 8:11:39 AM6/6/16
to Selenium Users
Thanks Rajasekaran, Now its working after giving Administrative rights to Jenkins.
 
Shabana Parveen

Ivan Trechyokas

unread,
Jun 7, 2016, 3: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, 7:10:02 AM6/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, 2: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, 2: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, 1:15:44 AM6/29/16
to Selenium Users
Hi All,
 My problem is :when I start the tomcat using \bin\tomcate7.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, 3: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?

Thanks.Sarvjeet

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, 4: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, 12:14:05 PM7/19/16
to Selenium Users
That worked for me! Thanks!

niyaz hashmi

unread,
Jul 26, 2016, 8:00:43 AM7/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, 9:31:16 AM7/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, 9:43:34 AM7/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, 9:48:11 AM7/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-jobEnables 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, 1:19:42 AM8/9/16
to Selenium Users
Hello @Sarvjeet, 

Sorry I am not receiving any email notification regarding your request, Please check my comment regarding your question answer https://github.com/FuckTheWorld/chromedriver/issues/539#issuecomment-229252195

Thanks
Shabana

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

Sarvjeet Kumar Singh

unread,
Aug 9, 2016, 1:37:17 AM8/9/16
to seleniu...@googlegroups.com
Thanks Shabana for the help. Appreciate it.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/gfvfH-YEC48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/6178f0f2-aa7d-4b1c-a964-3a603bec0e80%40googlegroups.com.

Priya Kharb

unread,
Aug 9, 2016, 2: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, 2: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);

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/gfvfH-YEC48/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

Priya Kharb

unread,
Aug 9, 2016, 5:08:19 AM8/9/16
to Selenium Users
@Sarvjeet,

Thank you so much for quick reply.

It woks for me...:-)

Thanks,
Priya Kharb
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Sarvjeet Kumar Singh

unread,
Aug 9, 2016, 5:15:11 AM8/9/16
to seleniu...@googlegroups.com
You welcome Priya :) Great to know that it worked.

To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/db43f5a6-e3a3-4d20-9bd9-a2142b98ff18%40googlegroups.com.

Cameron Spencer

unread,
Aug 15, 2016, 12: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, 1: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, 11:39:57 AM8/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, 1:32:05 AM10/14/17
to Selenium Users
Thanks a lot!!!!

This worked for me and saved a lot of thime :) 
Reply all
Reply to author
Forward
0 new messages