-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to find an exact match for CDP version 123, returning the closest version; found: 121; Please update to a Selenium version that supports CDP version 123[馃悰 Bug]: #13791
Comments
@westsidedev, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Our example tests in CI do not show that warning. Please provide your |
Hi, @westsidedev. Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue. Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough. Reply to this issue when all information is provided, thank you. |
POM <dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.19.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>4.19.1</version>
</dependency> CODEChromeOptions options = new ChromeOptions();
options.setBinary("/bin/google-chrome-stable");
WebDriver driver = new ChromeDriver(options);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
driver.get("https://google.com"); with just that it issues a warning |
Can you share the complete pom please? |
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.westsidedev</groupId>
<artifactId>AvisoBZ_bot</artifactId>
<version>6.0</version>
<name>AvisoBZ_bot</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.19.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>4.19.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.westsidedev.avisobz.App</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>AvisoBZ_bot-6.0</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> |
What happens if you remove the |
I created a sample project with the dependencies from your pom at https://github.com/diemol/selenium-issues/tree/master/selenium/issue-13791, and I executed it on GitHub actions, and I did not see the issue. Can you provide a GitHub repository I can use to reproduce the issue? |
if I remove |
I just wanted to let you know that you did not mention those details. @pujagani @joerg1985 do you know why the wrong CDP class is selected in the packaged jar? |
I also ran it on Windows thinking maybe it was a problem on my Linux distribution, but the warning repeats itself |
Well, a temporary solution I found was to set the log to severe Logger.getLogger(CdpVersionFinder.class.getName()).setLevel(Level.SEVERE); |
@westsidedev Could you add the following code and check the number of elements in the set, it should be 4:
If there are less than 4 elements, please try this version:
|
@joerg1985
|
@westsidedev Okay so the ServiceLoader does not work as expcted. In your pom the target java version is 1.7 and your version in use is 17, this might cause the trouble. I am not sure what the minimum supported versions are here, so i would suggest to change this to 17, perform a clean build and retry. |
@joerg1985 I did what you said, I changed from 1.7 to 17 but it's still the same thing, for now setting the log to severe worked |
Okay, i think building a jar with all dependencies in it does break the ServiceLoader. I currently have no access to a development environment, so i can not verify this. All dev-tools jar have the same descriptor file in META-INF/services with different content, merging them to one jar will overwrite them and only one version will pass this process. This could be the reason why only one can be found. |
I am also seeing this problem when updating to 4.19.1 from 4.18.1. I have downgraded and will wait for a fix. |
@BowlinAndBoatin are you also repackaging the jar? |
@diemol I wasn't planning on it. I am incorrect in thinking that a 4.19.2 patch is coming which resolves the issue? |
@BowlinAndBoatin I am asking because this issue only happens when you repackage the Selenium jar. If you are not doing that, then you are not having this same issue. You should create a new one sharing a way to reproduce it. |
@diemol oh. I am sorry. I am repackaging. My gradle project includes a couple dependencies like the below:
A new jar is produced from this which is used to drive ui tests. |
I do not think there is mutch that can be done to fix this. The root probleme is that identical files are replaced in the jar. You could exclude the unused versions from the classpath, to get rid of the warning. But be warned, there are other areas service loaderes are used and might fail due to this (not only talking about selenium dependencies). There might also be other files which are not unique, e.g. |
message you鈥檙e seeing is not a log message but a console output directly from the Selenium WebDriver. Unfortunately, these messages are not controlled by Log4j or any other Java logging framework, but are written directly to the standard error stream (stderr) by the WebDriver鈥檚 native components. it can be fixed by using this before you launch your browser: // Save the original stderr
PrintStream originalErr = System.err;
// Redirect stderr to a custom PrintStream
System.setErr(new PrintStream(new OutputStream() {
public void write(int b) {
// NO-OP
}
})); restore stderr to its original state afterwards // Restore the original stderr
System.setErr(originalErr); |
@theAnand17 this warning is created via logger here: selenium/java/src/org/openqa/selenium/devtools/CdpVersionFinder.java Lines 146 to 151 in aa62f10
|
I think you need to include this dependency to fix it? org.seleniumhq.selenium selenium-devtools-v123 4.19.1 |
Yeah, that used to work, including the devtools dependency but it no longer resolves the warning. |
"C:\Program Files\Java\jdk-21\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2023.3.4\lib\idea_rt.jar=63436:C:\Program Files\JetBrains\IntelliJ IDEA 2023.3.4\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2023.3.4\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2023.3.4\plugins\junit\lib\junit5-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2023.3.4\plugins\junit\lib\junit-rt.jar;C:\Users\radyr\IdeaProjects\seleniumapril24\target\classes;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-java\4.19.1\selenium-java-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-api\4.19.1\selenium-api-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-devtools-v121\4.19.1\selenium-devtools-v121-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-devtools-v122\4.19.1\selenium-devtools-v122-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-devtools-v123\4.19.1\selenium-devtools-v123-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-devtools-v85\4.19.1\selenium-devtools-v85-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\4.19.1\selenium-edge-driver-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\4.19.1\selenium-firefox-driver-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-http\4.19.1\selenium-http-4.19.1.jar;C:\Users\radyr.m2\repository\dev\failsafe\failsafe\3.3.2\failsafe-3.3.2.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\4.19.1\selenium-ie-driver-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\4.19.1\selenium-remote-driver-4.19.1.jar;C:\Users\radyr.m2\repository\com\google\guava\guava\33.1.0-jre\guava-33.1.0-jre.jar;C:\Users\radyr.m2\repository\com\google\guava\failureaccess\1.0.2\failureaccess-1.0.2.jar;C:\Users\radyr.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\radyr.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\radyr.m2\repository\org\checkerframework\checker-qual\3.42.0\checker-qual-3.42.0.jar;C:\Users\radyr.m2\repository\com\google\errorprone\error_prone_annotations\2.26.1\error_prone_annotations-2.26.1.jar;C:\Users\radyr.m2\repository\com\google\j2objc\j2objc-annotations\3.0.0\j2objc-annotations-3.0.0.jar;C:\Users\radyr.m2\repository\io\opentelemetry\semconv\opentelemetry-semconv\1.23.1-alpha\opentelemetry-semconv-1.23.1-alpha.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-api\1.36.0\opentelemetry-api-1.36.0.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-context\1.36.0\opentelemetry-context-1.36.0.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-exporter-logging\1.36.0\opentelemetry-exporter-logging-1.36.0.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-sdk-common\1.36.0\opentelemetry-sdk-common-1.36.0.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-sdk-extension-autoconfigure-spi\1.36.0\opentelemetry-sdk-extension-autoconfigure-spi-1.36.0.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-sdk-extension-autoconfigure\1.36.0\opentelemetry-sdk-extension-autoconfigure-1.36.0.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-api-events\1.36.0-alpha\opentelemetry-api-events-1.36.0-alpha.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-sdk-trace\1.36.0\opentelemetry-sdk-trace-1.36.0.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-extension-incubator\1.36.0-alpha\opentelemetry-extension-incubator-1.36.0-alpha.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-sdk\1.36.0\opentelemetry-sdk-1.36.0.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-sdk-metrics\1.36.0\opentelemetry-sdk-metrics-1.36.0.jar;C:\Users\radyr.m2\repository\io\opentelemetry\opentelemetry-sdk-logs\1.36.0\opentelemetry-sdk-logs-1.36.0.jar;C:\Users\radyr.m2\repository\net\bytebuddy\byte-buddy\1.14.12\byte-buddy-1.14.12.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-os\4.19.1\selenium-os-4.19.1.jar;C:\Users\radyr.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\4.19.1\selenium-safari-driver-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-support\4.19.1\selenium-support-4.19.1.jar;C:\Users\radyr.m2\repository\io\github\bonigarcia\webdrivermanager\5.8.0\webdrivermanager-5.8.0.jar;C:\Users\radyr.m2\repository\com\google\code\gson\gson\2.10.1\gson-2.10.1.jar;C:\Users\radyr.m2\repository\com\github\docker-java\docker-java\3.3.6\docker-java-3.3.6.jar;C:\Users\radyr.m2\repository\com\github\docker-java\docker-java-core\3.3.6\docker-java-core-3.3.6.jar;C:\Users\radyr.m2\repository\com\github\docker-java\docker-java-api\3.3.6\docker-java-api-3.3.6.jar;C:\Users\radyr.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.10.3\jackson-annotations-2.10.3.jar;C:\Users\radyr.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.10.3\jackson-databind-2.10.3.jar;C:\Users\radyr.m2\repository\com\fasterxml\jackson\core\jackson-core\2.10.3\jackson-core-2.10.3.jar;C:\Users\radyr.m2\repository\org\bouncycastle\bcpkix-jdk18on\1.76\bcpkix-jdk18on-1.76.jar;C:\Users\radyr.m2\repository\org\bouncycastle\bcprov-jdk18on\1.76\bcprov-jdk18on-1.76.jar;C:\Users\radyr.m2\repository\org\bouncycastle\bcutil-jdk18on\1.76\bcutil-jdk18on-1.76.jar;C:\Users\radyr.m2\repository\org\slf4j\jcl-over-slf4j\1.7.30\jcl-over-slf4j-1.7.30.jar;C:\Users\radyr.m2\repository\com\github\docker-java\docker-java-transport-httpclient5\3.3.6\docker-java-transport-httpclient5-3.3.6.jar;C:\Users\radyr.m2\repository\com\github\docker-java\docker-java-transport\3.3.6\docker-java-transport-3.3.6.jar;C:\Users\radyr.m2\repository\net\java\dev\jna\jna\5.13.0\jna-5.13.0.jar;C:\Users\radyr.m2\repository\org\brotli\dec\0.1.2\dec-0.1.2.jar;C:\Users\radyr.m2\repository\org\apache\commons\commons-lang3\3.14.0\commons-lang3-3.14.0.jar;C:\Users\radyr.m2\repository\org\apache\commons\commons-compress\1.26.1\commons-compress-1.26.1.jar;C:\Users\radyr.m2\repository\commons-codec\commons-codec\1.16.1\commons-codec-1.16.1.jar;C:\Users\radyr.m2\repository\commons-io\commons-io\2.15.1\commons-io-2.15.1.jar;C:\Users\radyr.m2\repository\org\apache\httpcomponents\client5\httpclient5\5.2.1\httpclient5-5.2.1.jar;C:\Users\radyr.m2\repository\org\apache\httpcomponents\core5\httpcore5\5.2\httpcore5-5.2.jar;C:\Users\radyr.m2\repository\org\apache\httpcomponents\core5\httpcore5-h2\5.2\httpcore5-h2-5.2.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\4.19.1\selenium-chrome-driver-4.19.1.jar;C:\Users\radyr.m2\repository\com\google\auto\service\auto-service-annotations\1.1.1\auto-service-annotations-1.1.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-chromium-driver\4.19.1\selenium-chromium-driver-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-json\4.19.1\selenium-json-4.19.1.jar;C:\Users\radyr.m2\repository\org\seleniumhq\selenium\selenium-manager\4.19.1\selenium-manager-4.19.1.jar;C:\Users\radyr.m2\repository\org\slf4j\slf4j-api\2.1.0-alpha1\slf4j-api-2.1.0-alpha1.jar;C:\Users\radyr.m2\repository\org\testng\testng\7.10.1\testng-7.10.1.jar;C:\Users\radyr.m2\repository\com\beust\jcommander\1.82\jcommander-1.82.jar;C:\Users\radyr.m2\repository\org\webjars\jquery\3.7.1\jquery-3.7.1.jar;C:\Users\radyr.m2\repository\org\junit\jupiter\junit-jupiter-api\5.11.0-M1\junit-jupiter-api-5.11.0-M1.jar;C:\Users\radyr.m2\repository\org\opentest4j\opentest4j\1.3.0\opentest4j-1.3.0.jar;C:\Users\radyr.m2\repository\org\junit\platform\junit-platform-commons\1.11.0-M1\junit-platform-commons-1.11.0-M1.jar;C:\Users\radyr.m2\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;C:\Users\radyr.m2\repository\junit\junit\4.13.1\junit-4.13.1.jar;C:\Users\radyr.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar" com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 taku.logindatamateJunit org.openqa.selenium.InvalidArgumentException: invalid argument
Process finished with exit code -1 |
im stuck this is the error which im facing its not surpassing chrome can you assist please |
i was getting the same warning, then i upgraded my pom.xml with the latest selenium-java version 4.20.0 and after that the warning went away.
|
You gotta update to 4.21.0 now, I just did and all related warnings disappeared
|
Oh yes, I forgot to close this. Thank you for the reminder. |
What happened?
This warning keeps appearing even though it is already on the latest version, but everything works normally, as you can see in the log I have
selenium 4.19.1
,chrome 123
,chromedriver 123
too, everything is newer and it still keeps giving me this warning,in termux android it is also like this.How can we reproduce the issue?
just do a simple initialization
Relevant log output
Operating System
BigLinux
Selenium version
Java 17.0.10
What are the browser(s) and version(s) where you see this issue?
Chrome 123
What are the browser driver(s) and version(s) where you see this issue?
Chromedriver 123
Are you using Selenium Grid?
no
The text was updated successfully, but these errors were encountered: