"Unable to find a matching set of capabilities" error on an attempt to pass platform capability to geckodriver
I have a problem to run my tests on firefox using RemoteWebDriver
Please help.
Start remote web driver with:
RemoteWebDriver driver = new RemoteWebDriver(new URL(remoteUrl), capabilities);
where url is: "http://172.16.2.79:4444/wd/hub"
and capabilities are:
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
capabilities.setBrowserName("firefox");
capabilities.setPlatform(Platform.WIN10);
System.setProperty("webdriver.gecko.driver", "C:\\tmp\\webdriver\\geckodriver\\geckodriver_0.19.1.exe");
my grid looks like:

and I'm getting error:
org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities
Build info: version: '3.7.0', revision: '2321c73', time: '2017-11-02T22:12:12.411Z'
System info: host: 'DESKTOP-EN0VGUA', ip: '172.16.150.196', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: unknown
remote stacktrace: stack backtrace:
0: 0x46c297 - <no info>
1: 0x4388b6 - <no info>
2: 0x4225f2 - <no info>
3: 0x406389 - <no info>
4: 0x40cc97 - <no info>
5: 0x657a89 - <no info>
6: 0x4185b6 - <no info>
7: 0x6535a1 - <no info>
8: 0x75a58744 - BaseThreadInitThunk
9: 0x77cd582d - RtlGetAppContainerNamedObjectPath
Command duration or timeout: 2.52 seconds
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:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:155)
The root cause is this geckodriver issue: https://github.com/mozilla/geckodriver/issues/1030
But let it keep open, may be we'll be able to find a workaround.
Is the best workaround at this moment on the Selenium side to change platformName in the nodeconfig.json to WINDOWS?
@dylanlive We have platform explicitly set in node config (as we separately test on Windows 7 and Windows 8) and we're getting the same issue anyway (on a capability set that should be an exact match).
experiencing same error, been trying most everything I can find troubleshooting-wise online, so far no luck :(
Same here. I've been trying to run Firefox 57.0.4 headless on Linux with Geckodriver 0.19.1.
Any platform tried fails. At least with debug the messages should be more explicit than Unable to find a matching set of capabilities
I was able to work around this within nodeConfig.json by changing platform from Win10 to Windows on v.3.8.1.
{
"browserName": "firefox",
"browserVersion": "58",
"platform": "Windows",
"marionette": true,
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
}
Sorry for English from Google translator. I ran into a similar problem, and the only solution I found for testing 7 in 10 windows was to intentionally change the browser name to " NODEcapabilities.json" it looks now like this: { "browserName": "firefox", "version": "58.0.WIN7", "platform": "WINDOWS", "maxInstances": 1, "seleniumProtocol": "WebDriver" } ], "maxSession": 5 }
"capabilities": [ { "browserName": "firefox", "version": "58.0.WIN7", "platform": "WINDOWS", "maxInstances": 1, "seleniumProtocol": "WebDriver" } This allows you to controllably run the necessary node
Closing as the linked GeckoDriver issue was fixed and closed. If anyone is bumping into this issue with Grid 4 (Alpha state when this comment is being written), please feel free to open a new issue with all the information requested on the template.