Issue
I am new to selenium. Able to configure selenium set up on Ubuntu.Configuration details given below:
- Google Chrome 68.0.3440.84
- ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706)
- Jenkins ver. 2.193
- ubuntu-18.04
- Selenium 3.13.0
- OpenJDK 1.8
- Doc referred for selenium set up : https://tecadmin.net/setup-selenium-chromedriver-on-ubuntu/
But every run I am getting below error on jenkins :
Opening chrome driver
Oct 30, 2019 1:26:49 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 0.998 s <<< FAILURE! - in TestSuite
[ERROR] setUp(com.test.WebAppTitleTestOnChrome) Time elapsed: 0.895 s <<< FAILURE!
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.
Please suggest me.
Solution
This error message...
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.
Your main issue possibly is the incompatibility between the version of the binaries you are using as follows:
- You are using chromedriver=2.41
- Release Notes of chromedriver=2.41 clearly mentions the following :
Supports Chrome v67-69
- You are using chrome= 68.0
- Your Selenium Client version is unknown to us.
- Your JDK version is unknown to us.
So there might be a mismatch between the JDK version , Selenium Client version , ChromeDriver v2.41 and the Chrome Browser v68.0
Solution
Ensure that:
- JDK is upgraded to current levels JDK 8u222.
- Selenium is upgraded to current levels Version 3.141.59.
- ChromeDriver is updated to current ChromeDriver v78.0 level.
- Chrome is updated to current Chrome Version 78.0 level. (as per ChromeDriver v78.0 release notes)
- Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
- If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
- Take a System Reboot.
- Execute your
@Test
as non-root user.
Answered By - undetected Selenium
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)