Closed muhammetaltindal closed 9 months ago
@muhammetaltindal, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
Yeah, https://github.com/SeleniumHQ/selenium/commit/ecfa9c40532679dd51c0f6691ea8da9564f8d603 broke that. I will have a look.
I'm also having this issue, I tested a few recent older version, the issue started in 4.12, which seems to be before the PR in question. Not sure if this helps. For me I'll just be rolling back to 4.11
I pushed a fix, but it will be available in the next release.
There is a change in how this argument needs to be passed, and now it is needed to use double quotation marks for this.
Then, using the example, it would become:
java -jar selenium-server-<version>.jar standalone --detect-drivers false --driver-configuration display-name="Chrome (custom capability true)" max-sessions=1 stereotype="{\"browserName\":\"chrome\", \"gsg:customcap\":true}" --port 6161
The docs were also fixed with this commit https://github.com/SeleniumHQ/seleniumhq.github.io/commit/333ff8ee4c92bb62f335f533272bc94ce66d0cc7
Does this cause a problem when running this parameter on windows powershell? I've tried both the old 4.11 and the nightly 4.18 selenium version with various different ways to try to escape the quotes but all fails. The example you give here throws this error for 4.18
PS C:\Users\exec\Downloads> java -jar selenium-server-standalone.jar standalone --detect-drivers false --driver-confi
guration display-name="Chrome (custom capability true)" max-sessions=1 stereotype="{\"browserName\":\"chrome\", \"gsg
:customcap\":true}" --port 6161
17:56:37.937 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
17:56:37.952 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
17:56:39.436 INFO [NodeOptions.getSessionFactories] - Detected 6 available processors
17:56:39.452 ERROR [Bootstrap.runMain] - Error during execution
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.openqa.selenium.grid.Bootstrap.runMain(Bootstrap.java:77)
at org.openqa.selenium.grid.Bootstrap.main(Bootstrap.java:70)
Caused by: org.openqa.selenium.grid.config.ConfigException: java.lang.reflect.InvocationTargetException
at org.openqa.selenium.grid.config.MemoizedConfig.getClass(MemoizedConfig.java:119)
at org.openqa.selenium.grid.node.config.NodeOptions.getNode(NodeOptions.java:181)
at org.openqa.selenium.grid.commands.Standalone.createNode(Standalone.java:257)
at org.openqa.selenium.grid.commands.Standalone.createHandlers(Standalone.java:223)
at org.openqa.selenium.grid.TemplateGridServerCommand.asServer(TemplateGridServerCommand.java:47)
at org.openqa.selenium.grid.commands.Standalone.execute(Standalone.java:243)
at org.openqa.selenium.grid.TemplateGridCommand.lambda$configure$4(TemplateGridCommand.java:122)
at org.openqa.selenium.grid.Main.launch(Main.java:83)
at org.openqa.selenium.grid.Main.go(Main.java:56)
at org.openqa.selenium.grid.Main.main(Main.java:41)
... 6 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.openqa.selenium.grid.config.ClassCreation.callCreateMethod(ClassCreation.java:51)
at org.openqa.selenium.grid.config.MemoizedConfig.lambda$getClass$4(MemoizedConfig.java:104)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1737)
at org.openqa.selenium.grid.config.MemoizedConfig.getClass(MemoizedConfig.java:99)
... 15 more
Caused by: org.openqa.selenium.json.JsonException: Unable to parse: {\browserName\:\chrome\, \gsg:customcap\:true}
at org.openqa.selenium.json.Json.toType(Json.java:169)
at org.openqa.selenium.json.Json.toType(Json.java:152)
at org.openqa.selenium.grid.node.config.NodeOptions.lambda$addDriverConfigs$10(NodeOptions.java:434)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.openqa.selenium.grid.node.config.NodeOptions.lambda$addDriverConfigs$11(NodeOptions.java:430)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at org.openqa.selenium.grid.node.config.NodeOptions.addDriverConfigs(NodeOptions.java:370)
at org.openqa.selenium.grid.node.config.NodeOptions.getSessionFactories(NodeOptions.java:245)
at org.openqa.selenium.grid.node.local.LocalNodeFactory.create(LocalNodeFactory.java:79)
... 23 more
Caused by: org.openqa.selenium.json.JsonException: Unable to determine type from: . Last 2 characters read: {\, next
44 characters to read: browserName\:\chrome\, \gsg:customcap\:true}
Build info: version: '4.18.0-SNAPSHOT', revision: '290cfff'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.10'
Driver info: driver.version: unknown
at org.openqa.selenium.json.JsonInput.peek(JsonInput.java:166)
at org.openqa.selenium.json.JsonInput.hasNext(JsonInput.java:296)
at org.openqa.selenium.json.JsonInputIterator.hasNext(JsonInputIterator.java:40)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.openqa.selenium.json.MapCoercer.lambda$apply$1(MapCoercer.java:75)
at org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$6(JsonTypeCoercer.java:171)
at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:146)
at org.openqa.selenium.json.Json.toType(Json.java:206)
at org.openqa.selenium.json.Json.toType(Json.java:167)
Yeah I don't think it's working for linux either. With this command:
java -jar /work/ams_config/cache/selenium-server-standalone.jar node --hub http://hostname:4444 --port 11001 --detect-drivers false --driver-configuration display-name="chrome" max-sessions=5 stereotype="{\"browserName\": \"chrome\", \"platformName\":\"linux\", \"browserVersion\": \"ANY\"}" --driver-configuration display-name="firefox" max-sessions=5 stereotype="{\"browserName\": \"firefox\", \"platformName\":\"linux\", \"browserVersion\": \"ANY\"}" --driver-configuration display-name="msedge" max-sessions=2 stereotype="{\"browserName\": \"msedge\", \"platformName\":\"linux\", \"browserVersion\": \"ANY\"}"
It only added the last browser, edge.
17:27:02.915 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
17:27:02.921 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
17:27:03.026 INFO [UnboundZmqEventBus.
@diemol Should I create a new ticket or should we just reopen this one?
When using the CLI, --driver-configuration
only accepts one configuration.
What we recommend is to always use a toml configuration file.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
What happened?
Running the simple command from the selenium tutorial does not work.
Documentation page: https://www.selenium.dev/documentation/grid/configuration/cli_options/
Selenium server jar is not able to read the provided --driver-configuration argument.
Run the command
Basically main issue is:
Take a look at the method
org.openqa.selenium.grid.config.Config#getArray
: In the for-loop it checksif (Config.DELIMITER.equals(next)) { ...
, however that never matches because that constant Config.DELIMITER is equal toString DELIMITER = DELIM_KEY + "=\"record-separator\""
, so I basically would need to pass that somehow via CLI in order to make the program understand it and return a non-empty config list. Right now always an empty config list is returned.How can we reproduce the issue?
Relevant log output
Operating System
macOS
Selenium version
4.17.0
What are the browser(s) and version(s) where you see this issue?
Chrome 121
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver: 121.0.6167.85
Are you using Selenium Grid?
4.17.0