Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create new service: ChromeDriverService #5876

Closed
Lastrellik opened this issue May 9, 2018 · 7 comments
Closed

Unable to create new service: ChromeDriverService #5876

Lastrellik opened this issue May 9, 2018 · 7 comments

Comments

@Lastrellik
Copy link

Meta -

OS: Windows 10 Hub, Ubuntu 18.04 Node
Selenium Version: 3.12.0
Browser: chromedriver
Browser Version: 2.38.552522 (64 bit)

Expected Behavior -

Chromedriver opens and navigates to http://www.google.com on Linux virtual machine node after being initiated from Java code on Windows 10 hub

Actual Behavior -

org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService

Steps to reproduce -

  1. Set up an Ubuntu 18.04 virtual machine on a Windows 10 host
  2. Begin selenium hub on host with
    java -jar selenium-server-standalone-3.12.0.jar -role hub
  3. Begin selenium node on Ubuntu machine with
    java -Dwebdriver.chrome.driver="<full path to driver>" -jar selenium-server-standalone-3.12.0.jar -role node -hub http://<ip of host machine>:4444/grid/register
  4. Run the following code on the host machine
@Test
public void test() throws MalformedURLException {
	DesiredCapabilities desCap = DesiredCapabilities.chrome();
	desCap.setPlatform(Platform.LINUX);
	WebDriver remoteWebDriver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), desCap);
	remoteWebDriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
	remoteWebDriver.get("http://www.google.com");
	remoteWebDriver.close();
}
@cgoldberg
Copy link
Contributor

incompatible versions of Chrome and Chromedriver?

@Lastrellik
Copy link
Author

@cgoldberg the version of Chrome I have installed is Chrome 66. Chromedriver v2.38 supports version 65-57 according to their download page. This problem has happened on both Ubuntu and Debian 64 bit.

@Lastrellik
Copy link
Author

I have found my problem.

The issue wasn't with the Chromedriver or Chrome or my code or Selenium, but rather with my version of Java. I installed Java on Ubuntu using

sudo apt-get install default-jre default-jdk -y

This installed the wrong version of Java. I was mistaken when I thought this command would always install the latest Java versions. Anyway, installing Oracle's version of Java resolved the issue for me.

I think it would be nice if when selenium starts there was a check to make sure that you have a compatible java version. All of the logs seemed to suggest that everything was running okay.

@barancev
Copy link
Member

@Lastrellik What Java flavour and version did you have before?

@Lastrellik
Copy link
Author

@barancev sooo I tried to recreate the issue and couldn't. I reinstalled Ubuntu and did everything the way I thought I did it before and it worked this time. I don't know what was wrong. Maybe there was a conflict between the version of Chrome I had installed and that particular version of Selenium. Either way, it seems to be working now.

@barancev
Copy link
Member

Thank you for getting us know everything is OK now.

@gopinath386
Copy link

I have facing issue "Unable to create new service: ChromeDriverService" Error for chrome, IEdriver driver execution.

I have used 3 node 1 hub. I set hub also one node. From hub machine i am executing the code. Selenium webdriver parallel execution.
I have set the drivers in system environment also in selenium code with driver path.

Issue: From hub system drivers not start to execute the code. Error message "org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService"
Refer the attached screen shot too.
error_run
nodes

Details:

Selenium java 3.14, Standalone 3.14 jar, TestNG 6.14.2, Java 1.8.0_144 and chromedriver 2.42.
Chrome as 69.0.3497.100.
Hub & node 1 for System as Windows Server 2008 R2 Enterprise, 64-bit. other two nodes System as Windows Server 2012 R2 Standard, 64-bit and all other is same properties.
Note: Same code working for other 2 nodes. Same chromedrivers only used in all three nodes.

Kindly check and advice. what is the root cause for the issue. Why the error shows only for the hub machine.
error_run
nodes

@lock lock bot locked and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants