Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: Log is spammed with "Unable to find an exact match for CDP version 117" #12831

Closed
Artur- opened this issue Sep 28, 2023 · 5 comments · Fixed by #12880
Closed

[🐛 Bug]: Log is spammed with "Unable to find an exact match for CDP version 117" #12831

Artur- opened this issue Sep 28, 2023 · 5 comments · Fixed by #12880

Comments

@Artur-
Copy link
Contributor

Artur- commented Sep 28, 2023

What happened?

Whenever a test is run and Selenium is not the very latest, or sometimes even the very latest version has not yet been released, each and every test logs

Sep 28, 2023 1:35:29 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116

It is not useful to have 100s or 1000s of these in the build logs.

Instead of logging them as a warning, maybe log them as debug info? So far I have never seen a test fail because there was a mismatch of 1 in the version so maybe a "small" differences could be logged as debug and a "large" difference as a warning

How can we reproduce the issue?

Run a Java test with any older Selenium version than the latest

Relevant log output

Sep 28, 2023 1:35:28 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:29 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:29 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:28 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:28 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:28 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:28 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:29 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:29 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:28 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:29 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:29 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116
Sep 28, 2023 1:35:29 PM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
WARNING: Unable to find an exact match for CDP version 117, so returning the closest version found: 116

Operating System

macOs Big Sur

Selenium version

4.12.1

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

chrome

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

chromedriver

Are you using Selenium Grid?

No response

@github-actions
Copy link

@Artur-, 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!

@titusfortner
Copy link
Member

titusfortner commented Sep 28, 2023

The mismatch can cause potentially undesired behavior, and (usually) there is an action that can be taken to fix this, so it should be flagged. The fix right now is to update to Selenium 4.13.

You can adjust what gets logged if you are using slf4j in logback.xml

    <logger name="org.openqa.selenium.devtools.CdpVersionFinder" level="OFF" />

Or, if you want to use my Selenium Logger

new SeleniumLogger().filterOut("CdpVersionFinder")

@titusfortner titusfortner closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2023
@aevans-mms
Copy link

Thanks @titusfortner

Is there any source for "potentially undesirable behavior" so users can see if their CDP / Driver version missmatch is causing specific issues? Or is this just the normal lag between Chrome / ChromeDriver versions that should be less of an issue as Chrome for Testing becomes more widely adopted?

@titusfortner
Copy link
Member

Selenium generates classes and methods for direct Chrome DevTools support. Google updates their DevTools code every release, so we need to regenerate everything on each release, and sometimes signatures of methods and parameters change and we have to fix it in the Selenium code. So you may have a method that Selenium is using that worked for an old version of Chrome, but will not work for the new version of Chrome.

But you're right we should change something, I'll make a PR with options

Copy link

github-actions bot commented Dec 4, 2023

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 github-actions bot locked and limited conversation to collaborators Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants