Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Chrome Not Reachable" when invoking Selenium scripts from Eclipse IDE

In our Selenium remote webdriver set up, we wrote our Selenium Java test scripts for to run in Chrome Browser. We are using Chrome Driver 2.28. Selenium Standalone Server 2.53. Selenium API 2.53. When we run our scripts from with in Eclipse IDE, 3 out of 5 times, the Chrome browser does not get invoked or take a long time to start by the script. When it fails to invoke the browser, it fails with this exception ....

> Caused by: org.openqa.selenium.WebDriverException: chrome not
> reachable   (Driver info: chromedriver=2.28.455520
> (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT
> 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 62.50 seconds
> Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15
> 17:00:58' System info: host: '<XXXXXXX>', ip: '<XXXXXXXXXX>',
> os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1',
> java.version: '1.8.0_121' 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: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:138)
>         ... 13 more 11:58:11.356 WARN - Exception: chrome not reachable

(Driver info: chromedriver=2.28.455520 (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 62.50 seconds Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58' System info: host: '', ip: '', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121' 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:678) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:170) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:138) ... 13 more 11:58:11.356 WARN - Exception: chrome not reachable

The temporary but painful solution is to go to Windows TaskManager and kill the half a dozen or so, Chrome.exe processes one after another. It is observed that even when we run our script or manually running the application, the Chrome browser processes that get invoked are more like 6 or 7, not less.

Is it a Chrome Browser or Selenium issue. ? Individually, I used NOT to have this problem unlike my team member who is having this problem since a year. As soon as I upgraded Chrome Driver to 2.28 from 2.25, I started having this problem.

like image 812
PraNuta Avatar asked Apr 05 '17 17:04

PraNuta


Video Answer


1 Answers

If you are running the script as root user, it will throw the error "chrome not reachable". Try running script as normal user, it will work fine.

like image 181
Rajat Chaudhary Avatar answered Oct 14 '22 21:10

Rajat Chaudhary