selenium: [🐛 Bug]: After updating from 4.15.0. to 4.16.1. getting "No drivers have been configured or have been found on PATH" but works in 4.15.0
What happened?
After updating from 4.15.0. to 4.16.1. I am getting the following error. The same configuration worked In 4.15.0
How can we reproduce the issue?
I have the following configuration setup using toml
hub = "xxxxxxxxxxxxxxxxxxxx"
override-max-sessions = true
max-sessions = 80
session-timeout = 1800
enable-managed-downloads = true
detect-drivers = true
Relevant log output
`java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
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:166)
at org.openqa.selenium.grid.node.httpd.NodeServer.createHandlers(NodeServer.java:126)
at org.openqa.selenium.grid.node.httpd.NodeServer.asServer(NodeServer.java:184)
at org.openqa.selenium.grid.node.httpd.NodeServer.execute(NodeServer.java:246)
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)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 3 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
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:1740)
at org.openqa.selenium.grid.config.MemoizedConfig.getClass(MemoizedConfig.java:99)
... 12 more
Caused by: org.openqa.selenium.grid.config.ConfigException: No drivers have been configured or have been found on PATH
at org.openqa.selenium.grid.node.config.NodeOptions.addDetectedDrivers(NodeOptions.java:513)
at org.openqa.selenium.grid.node.config.NodeOptions.getSessionFactories(NodeOptions.java:232)
at org.openqa.selenium.grid.node.local.LocalNodeFactory.create(LocalNodeFactory.java:79)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 17 more
Exception in thread "Thread-0" java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.grid.node.Node.getStatus()" because "this.node" is null
at org.openqa.selenium.grid.node.httpd.NodeServer.lambda$new$0(NodeServer.java:78)
at java.base/java.lang.Thread.run(Thread.java:1583)`
Operating System
Windows 10
Selenium version
4.16.2 C#
What are the browser(s) and version(s) where you see this issue?
Chrome 120
What are the browser driver(s) and version(s) where you see this issue?
Chrome 120
Are you using Selenium Grid?
4.16.1
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 20 (11 by maintainers)
Thank you everyone for confirming this is fixed for the upcoming release, which can be already tested on 4.17.0-SNAPSHOT
@zcindori Ok. I guess that confirms @joerg1985 hunch. The fix I think will be made available only in next version perhaps.
@zcindori - If you extract the selenium jar to a directory, you will find the selenium manager binaries in the below path
org/openqa/selenium/manager(under the directory wherein u extracted the jar usingjar -xvf selenium-server-4.16.1.jarcommand@diemol
NodeOptions.discoverDriversdoes filter the drivers via,WebDriverInfo::isAvailable, this method swallows all theWebDriverExceptions internally.The
DriverFinder.getPathshould not translate anyExceptions while calling the selenium manager intoNoSuchDriverExceptions. TheNoSuchDriverExceptioninWebDriverInfo::isAvailable/WebDriverInfo::isPresentshould be swallowed and all othersWebDriverExceptions should at least be logged. I can do this change the next days, to ensure there are logs when discovery of driver fails.I think the root cause of this issue is the same as in #13261, the need for the visual c++ redist x86 in 4.16.x