selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[🐛 Bug]: org.openqa.selenium.devtools.CdpInfo: module org.seleniumhq.selenium.remote_driver does not declare `uses`

Open Hussin22 opened this issue 2 years ago • 7 comments

What happened?

i install selenuim in java env using intelij idea i add selenuim via the maven depnedency but when i run driver.get("google.com")

this issue is apear :

org.openqa.selenium.devtools.CdpInfo: module org.seleniumhq.selenium.remote_driver does not declare uses

please what i can do here i use the last selenuim version 4,4,0

How can we reproduce the issue?

ChromeDriver driver = new ChromeDriver();
        driver.get("http://google.com");

Relevant log output

"C:\Program Files\BellSoft\LibericaJDK-18-Full\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2022.2\lib\idea_rt.jar=62034:C:\Program Files\JetBrains\IntelliJ IDEA 2022.2\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\TE326187\.m2\repository\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-java\4.4.0\selenium-java-4.4.0.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v102\4.4.0\selenium-devtools-v102-4.4.0.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v103\4.4.0\selenium-devtools-v103-4.4.0.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v104\4.4.0\selenium-devtools-v104-4.4.0.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-devtools-v85\4.4.0\selenium-devtools-v85-4.4.0.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-support\4.4.0\selenium-support-4.4.0.jar;C:\Users\TE326187\.m2\repository\com\google\auto\service\auto-service-annotations\1.0.1\auto-service-annotations-1.0.1.jar;C:\Users\TE326187\.m2\repository\com\google\auto\service\auto-service\1.0.1\auto-service-1.0.1.jar;C:\Users\TE326187\.m2\repository\com\google\auto\auto-common\1.2\auto-common-1.2.jar;C:\Users\TE326187\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\TE326187\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\TE326187\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\TE326187\.m2\repository\org\checkerframework\checker-qual\3.12.0\checker-qual-3.12.0.jar;C:\Users\TE326187\.m2\repository\com\google\errorprone\error_prone_annotations\2.11.0\error_prone_annotations-2.11.0.jar;C:\Users\TE326187\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-codec\4.1.78.Final\netty-codec-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-handler\4.1.78.Final\netty-handler-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-transport-native-epoll\4.1.78.Final\netty-transport-native-epoll-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-transport-native-kqueue\4.1.78.Final\netty-transport-native-kqueue-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-resolver\4.1.78.Final\netty-resolver-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-exporter-logging\1.16.0\opentelemetry-exporter-logging-1.16.0.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-sdk-metrics\1.16.0\opentelemetry-sdk-metrics-1.16.0.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-sdk-logs\1.16.0-alpha\opentelemetry-sdk-logs-1.16.0-alpha.jar;C:\Users\TE326187\.m2\repository\org\asynchttpclient\async-http-client-netty-utils\2.12.3\async-http-client-netty-utils-2.12.3.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-codec-socks\4.1.60.Final\netty-codec-socks-4.1.60.Final.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-handler-proxy\4.1.60.Final\netty-handler-proxy-4.1.60.Final.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-transport-native-epoll\4.1.60.Final\netty-transport-native-epoll-4.1.60.Final-linux-x86_64.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-transport-native-kqueue\4.1.60.Final\netty-transport-native-kqueue-4.1.60.Final-osx-x86_64.jar;C:\Users\TE326187\.m2\repository\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;C:\Users\TE326187\.m2\repository\com\typesafe\netty\netty-reactive-streams\2.0.4\netty-reactive-streams-2.0.4.jar;C:\Users\TE326187\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\TE326187\.m2\repository\org\openjfx\javafx-controls\18.0.1\javafx-controls-18.0.1.jar;C:\Users\TE326187\.m2\repository\org\openjfx\javafx-graphics\18.0.1\javafx-graphics-18.0.1.jar;C:\Users\TE326187\.m2\repository\org\openjfx\javafx-base\18.0.1\javafx-base-18.0.1.jar;C:\Users\TE326187\.m2\repository\org\openjfx\javafx-fxml\18.0.1\javafx-fxml-18.0.1.jar -p "C:\Users\TE326187\.m2\repository\io\netty\netty-buffer\4.1.78.Final\netty-buffer-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\dev\failsafe\failsafe\3.2.4\failsafe-3.2.4.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-sdk-extension-autoconfigure-spi\1.16.0\opentelemetry-sdk-extension-autoconfigure-spi-1.16.0.jar;C:\Users\TE326187\.m2\repository\org\openjfx\javafx-base\18.0.1\javafx-base-18.0.1-win.jar;C:\Users\TE326187\.m2\repository\org\openjfx\javafx-fxml\18.0.1\javafx-fxml-18.0.1-win.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-transport-classes-epoll\4.1.78.Final\netty-transport-classes-epoll-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-api\1.16.0\opentelemetry-api-1.16.0.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-sdk-common\1.16.0\opentelemetry-sdk-common-1.16.0.jar;C:\Users\TE326187\.m2\repository\org\openjfx\javafx-graphics\18.0.1\javafx-graphics-18.0.1-win.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\4.4.0\selenium-ie-driver-4.4.0.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\4.4.0\selenium-chrome-driver-4.4.0.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-common\4.1.78.Final\netty-common-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-opera-driver\4.4.0\selenium-opera-driver-4.4.0.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-transport-classes-kqueue\4.1.78.Final\netty-transport-classes-kqueue-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-transport\4.1.78.Final\netty-transport-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\io\ous\jtoml\2.0.0\jtoml-2.0.0.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-json\4.4.0\selenium-json-4.4.0.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-sdk-trace\1.16.0\opentelemetry-sdk-trace-1.16.0.jar;C:\Users\TE326187\.m2\repository\org\asynchttpclient\async-http-client\2.12.3\async-http-client-2.12.3.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\4.4.0\selenium-firefox-driver-4.4.0.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-chromium-driver\4.4.0\selenium-chromium-driver-4.4.0.jar;C:\Users\TE326187\.m2\repository\org\openjfx\javafx-controls\18.0.1\javafx-controls-18.0.1-win.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-http\4.4.0\selenium-http-4.4.0.jar;C:\Users\TE326187\.m2\repository\com\beust\jcommander\1.82\jcommander-1.82.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\4.4.0\selenium-safari-driver-4.4.0.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-semconv\1.16.0-alpha\opentelemetry-semconv-1.16.0-alpha.jar;C:\Users\TE326187\OneDrive - TE Connectivity\Documents\intelij\Selenuim_test\target\classes;C:\Users\TE326187\.m2\repository\io\netty\netty-codec-http\4.1.78.Final\netty-codec-http-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\io\netty\netty-transport-native-unix-common\4.1.78.Final\netty-transport-native-unix-common-4.1.78.Final.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\4.4.0\selenium-remote-driver-4.4.0.jar;C:\Users\TE326187\.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\TE326187\.m2\repository\net\bytebuddy\byte-buddy\1.12.10\byte-buddy-1.12.10.jar;C:\Users\TE326187\.m2\repository\com\google\guava\guava\31.1-jre\guava-31.1-jre.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\4.4.0\selenium-edge-driver-4.4.0.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-context\1.16.0\opentelemetry-context-1.16.0.jar;C:\Users\TE326187\.m2\repository\org\seleniumhq\selenium\selenium-api\4.4.0\selenium-api-4.4.0.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-sdk\1.16.0\opentelemetry-sdk-1.16.0.jar;C:\Users\TE326187\.m2\repository\io\opentelemetry\opentelemetry-sdk-extension-autoconfigure\1.16.0-alpha\opentelemetry-sdk-extension-autoconfigure-1.16.0-alpha.jar" -m com.hussin.selenuim_test/com.hussin.selenuim_test.HelloApplication
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting ChromeDriver 105.0.5195.52 (412c95e518836d8a7d97250d62b29c2ae6a26a85-refs/branch-heads/5195@{#853}) on port 50007
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Sep 15, 2022 6:44:36 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected upstream dialect: W3C
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at javafx.fxml/javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1857)
	at javafx.fxml/javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1724)
	at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
	at javafx.graphics/javafx.scene.Node.fireEvent(Node.java:8797)
	at javafx.controls/javafx.scene.control.Button.fire(Button.java:203)
	at javafx.controls/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:208)
	at javafx.controls/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
	at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
	at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
	at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
	at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3881)
	at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1874)
	at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2607)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450)
	at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
	at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449)
	at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:551)
	at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:937)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at com.sun.javafx.reflect.Trampoline.invoke(MethodUtil.java:77)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at javafx.base/com.sun.javafx.reflect.MethodUtil.invoke(MethodUtil.java:275)
	at javafx.fxml/com.sun.javafx.fxml.MethodHelper.invoke(MethodHelper.java:84)
	at javafx.fxml/javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1854)
	... 46 more
Caused by: java.util.ServiceConfigurationError: org.openqa.selenium.devtools.CdpInfo: module org.seleniumhq.selenium.remote_driver does not declare `uses`
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:593)
	at java.base/java.util.ServiceLoader.checkCaller(ServiceLoader.java:579)
	at java.base/java.util.ServiceLoader.<init>(ServiceLoader.java:507)
	at java.base/java.util.ServiceLoader.load(ServiceLoader.java:1653)
	at org.seleniumhq.selenium.remote_driver/org.openqa.selenium.devtools.CdpVersionFinder.<init>(CdpVersionFinder.java:44)
	at org.seleniumhq.selenium.chromium_driver/org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:118)
	at org.seleniumhq.selenium.chrome_driver/org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:81)
	at org.seleniumhq.selenium.chrome_driver/org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:49)
	at com.hussin.selenuim_test/com.hussin.selenuim_test.HelloController.onHelloButtonClick(HelloController.java:16)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	... 53 more

Operating System

windows 10

Selenium version

4.4.0

What are the browser(s) and version(s) where you see this issue?

105.0.5195.102

What are the browser driver(s) and version(s) where you see this issue?

105.0.5195.102

Are you using Selenium Grid?

no

Hussin22 avatar Sep 15 '22 17:09 Hussin22

@Hussin22, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

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!

github-actions[bot] avatar Sep 15 '22 17:09 github-actions[bot]

are you using a pom file to manage dependencies? Check to make sure you are properly setting selenium-java to the latest version.

titusfortner avatar Sep 15 '22 19:09 titusfortner

yes i use pom image there is the last version

Hussin22 avatar Sep 15 '22 20:09 Hussin22

Hmm, you can check to see if you have a dependency conflict — https://www.javaadvent.com/2020/12/how-to-debug-dependency-conflicts-in-maven-and-gradle.html

Otherwise we'll release 4.5 soon and it has direct support for CDP v105 which might make the difference.

titusfortner avatar Sep 15 '22 21:09 titusfortner

i check but there is no conflicts , i see in youtube i did not found any sulotion for that is there in thing to do i need to use it in my project

Hussin22 avatar Sep 15 '22 22:09 Hussin22

temporary i fix that by go back to version 4.0.0 i will wait the next update to check

Hussin22 avatar Sep 15 '22 22:09 Hussin22

wait 4.0.0 is working and 4.4.0 is not?

titusfortner avatar Sep 16 '22 03:09 titusfortner

@titusfortner Do you have a release date for Selenium 4.5.0?

Am also being impacted by this issue.

dnicholas2001 avatar Sep 23 '22 00:09 dnicholas2001

@titusfortner Not sure where module-info.java is generated, but was able to go back to version 4.1.3 and found that selenium-remote-driver Java module is using uses org.openqa.selenium.devtools.CdpInfo; but the newer versions are using uses org.openqa.selenium.devtools.CdpVersionFinder.

I think the uses directive in the remote_driver Java module might need to be changed back to CdpInfo because CdpVersionFinder.java is attempting to load providers of CdpInfo.class on line 44 of CdpVersionFinder.java using the ServiceLoader.load.

dnicholas2001 avatar Sep 23 '22 02:09 dnicholas2001

@titusfortner and @dennisoelkers and @diemol The change in 4.1.4 that might be related to this is in PR #10509 in which the ServiceLoader.load method call added a second parameter for the class loader. This change was not there in 4.1.3 (according to the CHANGELOG)

Is it possible that this change has an impact on how the uses directive is calculated in ModuleGenerator#readServicesFromClasses?

dnicholas2001 avatar Sep 23 '22 02:09 dnicholas2001

Thank you for the details. I am attempting to reproduce this and triage it. Which version of Java are you using? Any suggestions on how I can reproduce this? Because locally, I am unable to see the error. If I can reproduce it, I can look into what might be causing it based on your observations. I will appreciate a reproducible project or files that will help me see the error.

pujagani avatar Sep 23 '22 06:09 pujagani

@pujagani Steps to reproduce

  1. Require Java 17, latest version
  2. Require a multi module Java project
  3. For example, create a Java module, called module-a. Create a Java test module called module-a-test
  4. In module-a-test require module-a as well as the Selenium requirements
  5. Verify each module has a module-info.java file in the same directory as the java directory
  6. Run a JUnit test that creates a new ChromeDriver from within module-a-test
  7. Chrome browser will start, chromedriver will start, however, shortly afterwards, this error will be encountered

Alternatively, I think if you add module-info.java to an existing project in the java directory, this should also reproduce the error.

Hope this helps

CC: @titusfortner

dnicholas2001 avatar Sep 23 '22 11:09 dnicholas2001

starter-repro.zip

Attaching sample project to repro the issue

CC: @pujagani @titusfortner

dnicholas2001 avatar Sep 23 '22 12:09 dnicholas2001

@shs96c Do you know if we can use byte-buddy or aspectj here to add uses CdpInfo to module-info.class at runtime for the remote_driver module?

dnicholas2001 avatar Sep 25 '22 13:09 dnicholas2001

Thank you for sharing the repo. I am setting it up. I did not have Java 17 and now that is sorted out, I am resolving some dependency conflicts. I will share if I am able to reproduce the issue once I have all of that sorted.

pujagani avatar Sep 26 '22 05:09 pujagani

I am able to reproduce the issue. Thank you for the repo.

pujagani avatar Sep 26 '22 06:09 pujagani

While triaging I came across upon a fix Simon made earlier https://github.com/SeleniumHQ/selenium/commit/4ed89beda0d67665987dcba4ea8812afea34de7f. Ideally, that should solve the case. After locally building the project, the module-info.class of remote-webdriver now contains the following:

  uses org.openqa.selenium.WebDriverInfo;
  uses org.openqa.selenium.devtools.CdpInfo;
  uses org.openqa.selenium.devtools.CdpVersionFinder;
  uses org.openqa.selenium.grid.config.HasRoles;
  uses org.openqa.selenium.remote.AdditionalHttpCommands;
  uses org.openqa.selenium.remote.AugmenterProvider;
  uses org.openqa.selenium.remote.service.DriverService.Builder;
  uses org.openqa.selenium.remote.session.CapabilitiesFilter;
  uses org.openqa.selenium.remote.session.CapabilityTransform;

Key part relevant to this issue is uses org.openqa.selenium.devtools.CdpInfo; This will be part of 4.5 release and hopefully will fix the issue faced here.

pujagani avatar Sep 26 '22 13:09 pujagani

We have a new bug, blocking us from retesting this one, #11069

CC: @titusfortner CC: @pujagani CC: @shs96c

dnicholas2001 avatar Sep 30 '22 12:09 dnicholas2001

@dnicholas2001 Can you help confirm if this is resolved so we can close the issue? Thank you!

pujagani avatar Oct 27 '22 10:10 pujagani

@pujagani Many thanks for the fix. This is working with Selenium 4.5.3. Thanks again!

dnicholas2001 avatar Oct 29 '22 12:10 dnicholas2001

Thanks for the feedback. Closing this issue.

diemol avatar Oct 30 '22 07:10 diemol

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.

github-actions[bot] avatar Nov 30 '22 00:11 github-actions[bot]