Unable to create new remote session. desired capabilities = Capabilities [{browserName=chrome, version=55.0.2, platform=WINDOWS}]

Viewed 3774

I have set up a selenium grid hub and node. In my java I set my capabilities like this:

Login.capability = DesiredCapabilities.chrome();
Login.capability.setVersion("55.0.2");
Login.capability.setBrowserName("chrome");
Login.capability.setPlatform(org.openqa.selenium.Platform.WINDOWS);
Login.driver = new RemoteWebDriver(new URL("http://xxx.xxx.xxx.xxx/wd/hub"), Login.capability);   

When I start the build I get this error message:

Unable to create new remote session. desired capabilities = Capabilities [{browserName=chrome, version=55.0.2, platform=WINDOWS}], required capabilities = Capabilities [{}]

The hub output:

selenium grid no capabilities found in request

The node output says this:

16:23:13.323 INFO [ActiveSessionFactory.apply] - Capabilities are: {
  "browserName": "chrome",
  "goog:chromeOptions": {
  },
  "platform": "WINDOWS",
  "version": "55.0.2"
}
16:23:13.324 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5) on port XXXXXXXXX
Only local connections are allowed.

So it seems the node works correctly but why does the hub say that there are no capabilities in the log?

1 Answers

This error message...

Unable to create new remote session. desired capabilities = Capabilities [{browserName=chrome, version=55.0.2, platform=WINDOWS}], required capabilities = Capabilities [{}]

...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.

As per your code trials you have set the Chrome Browser version to 55.0.2. Hence you need to ensure that the Selenium Node client have Chrome Browser v55.0.2 installed in it.

From another perspective:

  • You are using ChromeDriver 2.42
  • Release Notes of ChromeDriver 2.42 clearly mentions the following :

Supports Chrome v68-70

So there is a clear mismatch between the ChromeDriver v2.42 and the Chrome Browser v55.0.2

Solution

As a solution you need to:

Related