1

I am trying to run the selenium testcase using chromium browser in linux ..

Step to setup chromium browser in linux :

downloaded the chrome-linux.zip from the below path and extract in the linux machine in some specific path

https://storage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/572137/chrome-linux.zip

Put the latest chromedriver linux version file(2.40) in the linux machine

full permission(777) has been given to chromedrive file aswell as the chrome-linux folder also.

And the selenium code :

WebDriver driver =  null;
DesiredCapabilities caps =  DesiredCapabilities.chrome();
ChromeOptions opts = new ChromeOptions();
opts.addArguments("--headless");
opts.addArguments("--disable-extensions");
opts.setBinary("/opt/chromeos/chrome-linux/chrome");//path of the chrome application file in linux 
caps.setCapability(ChromeOptions.CAPABILITY, opts);
System.setProperty("webdriver.chrome.driver", "/opt/chromeos/chomedriver");//path of the chromedriver file in linux
driver = new ChromeDriver(caps);
driver.get("https://www.google.com/");

When I am trying to run I am getting unreachable browser exception .

/opt/chromeos/chromedriver: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /opt/chromeos/chromedriver)
/opt/chromeos/chromedriver: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/chromeos/chromedriver)
/opt/chromeos/chromedriver: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /opt/chromeos/chromedriver)
Jul 03, 2018 12:46:53 PM org.openqa.selenium.os.UnixProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'ION-MUM-PreQA-JB-61-75', ip: '10.10.61.75', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-696.el6.x86_64', java.version: '1.7.0_101'
Driver info: driver.version: ChromeDriver
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
        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)
        at com.DemoChromiumTest.main(DemoChromiumTest.java:24)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'ION-MUM-PreQA-JB-61-75', ip: '10.10.61.75', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-696.el6.x86_64', java.version: '1.7.0_101'
Driver info: driver.version: ChromeDriver
        at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:178)
        at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:166)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
        ... 6 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:16689/status] to be available after 20012 ms
        at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:107)
        at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:175)
        ... 9 more
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
        at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:143)
        at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:80)
        ... 10 more
Caused by: java.util.concurrent.TimeoutException
        at java.util.concurrent.FutureTask.get(FutureTask.java:201)
        at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:130)
        ... 11 more

Any advise or guidance would be greatly appreciated...

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Dev
  • 378
  • 2
  • 16

1 Answers1

2

This error message...

/opt/chromeos/chromedriver: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /opt/chromeos/chromedriver)
/opt/chromeos/chromedriver: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/chromeos/chromedriver)
/opt/chromeos/chromedriver: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /opt/chromeos/chromedriver)
Jul 03, 2018 12:46:53 PM org.openqa.selenium.os.UnixProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session due to missing GLIBC_2.15 and/or GLIBC_2.14.

First of all, as per the your question details as you are using Selenium Java Client v2.53.0 I don't see any issue with your code block. However as you are on Linux OS instead of chrome-linux.zip you must ensure that you downloaded chrome-linux.tar / chrome-linux.tz and untarred it for proper usage.


What went wrong

/lib64/libc.so.6: version 'GLIBC_2.15' not found and /lib64/libc.so.6: version 'GLIBC_2.14' not found

The ChromeDriver binary you are trying to execute was built on a GLIBC-2.15 based system which will not get executed on any system with older GLIBC.

/usr/lib64/libstdc++.so.6: version 'GLIBCXX_3.4.15' not found

Similarly, the ChromeDriver binary you are trying to execute was built on a GLIBCXX_3.4.15 based system which will not get executed on any system with older GLIBC where as your GLIBC is older than 2.14.


tl;dr

Look out at DistroWatch.com for compatible binaries.


Possible Solutions

Further, you haven't mentioned your exact environment details still here are some of the possible reasons and solutions:

  • As per Error on running chromedriver in CentOS 6.6 if you are using CentOS below version 7, upgrading to CentOS version 7 will solve your issue.
  • As per chromedriver_linux64_2.1.zip not working in CentOS 6.4 (latest) you need to:

    • Download latest chrome for CentOS6.4 ( http://chrome.richardlloyd.org.uk/ )
    • Download latest ChromeDriver (2.40) .
    • Now go to /opt/google/chrome folder (You need sudo access).
    • Copy chromedriver to this folder (this is for simplication you can have it anywhere).
    • Create a copy of google-chrome as google-chromedriver. vi google-chromedriver and last line modify as:

       exec -a "$0" "$HERE/chromedriver"  "$@"  (you can provide custom location of driver too).
      
    • Include in path

      sudo ln  -s /opt/google/chrome/google-chromedriver /usr/bin/chromedriver  
      
    • Change the permission:

      chmod +x chromedriver
      
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352