SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.75k stars 8.2k forks source link

[๐Ÿ› Bug]: Getting following google API issue with Chrome-116.0.5845.97 and Selenium 4.11.0 which is blocking browser launch #12567

Closed Chetantn closed 1 year ago

Chetantn commented 1 year ago

What happened?

Note: **Already raised this issue with ChromeLabs, they said it is an issue with Selenium, please refer the issue here https://github.com/GoogleChromeLabs/chrome-for-testing/issues/41

Issue Details as below.

  1. Yesterday i have updated the chrome version to latest i.e 116.0.5845.97 and i'm using selenium 4.11.0 when i'm trying to launch the Chrome browser i'm getting following issue.

Error Logs for your reference: โ†[m13:59:45,961 ERROR [HttpClient] Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116 13:59:45,961 WARN [VersionDetector] Exception reading https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116 to get latest version of chromedriver (Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116) โ†[37;41m2023-08-16 14:00:00,877 [ERROR] Failed to publish message com.smartbear.events.UpdateNavigatorTreeMessage@3b7fb962 to listener method com.smartbear.ready.ui.project.ServiceVModulePanel.handleUpdateModuleTreeMessage โ†[m java.lang.reflect.InvocationTargetException: null at jdk.internal.reflect.GeneratedMethodAccessor304.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at net.engio.mbassy.dispatch.ReflectiveHandlerInvocation.invokeHandler(ReflectiveHandlerInvocation.java:23) [mbassador-1.1.10.jar:?] at net.engio.mbassy.dispatch.ReflectiveHandlerInvocation.invoke(ReflectiveHandlerInvocation.java:49) [mbassador-1.1.10.jar:?]

==============================================================================

  1. Selenium is started using below command to make use of Selenium Manager

java -jar selenium-server-4.11.0.jar standalone -p 4450 --session-timeout 620 --selenium-manager true

==============================================================================

  1. As i hit this below url i'm getting Latest available version as 114 only: https://chromedriver.storage.googleapis.com/LATEST_RELEASE

image

==============================================================================

  1. Also i can see selenium manager has downloaded required chrome driver in .cache, please refer below image

image

How can we reproduce the issue?

Just update the Chrome browser version to latest 116.xxx and try to launch the browser using Selenium 4.11.0

Relevant log output

Error Logs for your reference:
โ†[m13:59:45,961 ERROR [HttpClient] Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116
13:59:45,961 WARN [VersionDetector] Exception reading https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116 to get latest version of chromedriver (Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116)
โ†[37;41m2023-08-16 14:00:00,877 [ERROR] Failed to publish message com.smartbear.events.UpdateNavigatorTreeMessage@3b7fb962 to listener method com.smartbear.ready.ui.project.ServiceVModulePanel.handleUpdateModuleTreeMessage
โ†[m java.lang.reflect.InvocationTargetException: null
at jdk.internal.reflect.GeneratedMethodAccessor304.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at net.engio.mbassy.dispatch.ReflectiveHandlerInvocation.invokeHandler(ReflectiveHandlerInvocation.java:23) [mbassador-1.1.10.jar:?]
at net.engio.mbassy.dispatch.ReflectiveHandlerInvocation.invoke(ReflectiveHandlerInvocation.java:49) [mbassador-1.1.10.jar:?]

Operating System

Windows 10

Selenium version

Selenium 4.11.0

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

Chrome 116.XXX

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

116.0.584.96

Are you using Selenium Grid?

No response

github-actions[bot] commented 1 year ago

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

mathiasbynens commented 1 year ago

The new endpoints to use are https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints. Specifically, to turn a major version number like 116 into a fully qualified version like 116.0.5845.96, see latest-versions-per-milestone. To turn a MAJOR.MINOR.BUILD version into a fully qualified version, see latest-patch-versions-per-build.

https://groups.google.com/g/chromedriver-users/c/qVPTFXnedw0

titusfortner commented 1 year ago

Please turn on logging so we can see what Selenium is looking for - https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/

If it is an issue with the grid, please turn on grid logging - https://www.selenium.dev/documentation/grid/configuration/cli_options/#logging

Selenium 4.11 will not be looking for LATEST_RELEASE_116, so perhaps you have a dependency conflict - https://www.javaadvent.com/2020/12/how-to-debug-dependency-conflicts-in-maven-and-gradle.html

mariusano commented 1 year ago

I had the same issue. Just update your selenium package to the latest version (selenium-4.11.2). It seems that the olders don't handle chrome after 114

Chetantn commented 1 year ago

I'm able to launch the chrome 116. now

Yes it complaints about the same issue with 4.11.0 , but it is not stopping browser launch now,

โ†[mโ†[37m2023-08-18 15:36:09,535 [DEBUG] [CHROME] Navigate to https://10.3.2.154/nmp/nmp.html โ†[m15:36:12,336 ERROR [HttpClient] Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116 15:36:12,337 WARN [VersionDetector] Exception reading https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116 to get latest version of chromedriver (Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116) โ†[37m2023-08-18 15:36:15,072 [DEBUG] RemoteDrivers has been set with Selenium server opened on port [4450] โ†[mโ†[30m2023-08-18 15:36:15,073 [INFO ] RemoteDriverAddress: http://10.12.144.50:4450/wd/hub โ†[mโ†[30m2023-08-18 15:36:15,123 [INFO ] ..................................................wait----------------------------------------- โ†[mโ†[30m2023-08-18 15:36:19,793 [INFO ] Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*, user-data-dir=C:/.CI/Tools/...], extensions: []}} โ†[mโ†[30m2023-08-18 15:36:19,830 [INFO ] RemoteWebDriver: chrome on Windows 10 (871ea16794aef390e2895a792608bd53)

aasthaJain2897 commented 1 year ago

Hi, I have UI test script using selenium 3 and java 8, now my chrome got updated to 16.x and not able to execute due to chorome for test(cft). So, how can i run ui scripts using selenium 3 and java 8 on chrome 16.x version? Is it supported?

Thanks!!

titusfortner commented 1 year ago

We only support the latest version of Selenium. You may need to upgrade to get things working - https://www.selenium.dev/documentation/webdriver/getting_started/upgrade_to_selenium_4/

aasthaJain2897 commented 1 year ago

We only support the latest version of Selenium. You may need to upgrade to get things working - https://www.selenium.dev/documentation/webdriver/getting_started/upgrade_to_selenium_4/

If any workarounds, please suggest. It will be very helpfull?

github-actions[bot] commented 1 year ago

๐Ÿ’ฌ Please ask questions at:

sus2-sf commented 1 year ago

There is a workaround: Upgrade your browser to 116 Upgrade your selenium to 4.11 Now when selenium navigates to https://chromedriver.storage.googleapis.com/LATEST_RELEASE to get the latest it finds browser version 114 instead so auto-download by the tool/test would not help.

So what you can do is download chromedriver v116 manually and place it in the .cache folder or whereever the tests get's the driver from and you should be able to run the tests

Note: If you go to https://chromedriver.storage.googleapis.com/LATEST_RELEASE_115 or https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116

NoSuchKey The specified key does not exist.
No such object: chromedriver/LATEST_RELEASE_116
titusfortner commented 1 year ago

If you update to 4.11 you don't need to do any of that, selenium will do it for you.

gihanwijesekara46 commented 1 year ago

you can fix the issue using this video https://www.youtube.com/watch?v=MWVzCuTK2bs&t=1s&ab_channel=GihanWijesekaraW

md-saddamhossain commented 1 year ago

I have upgraded to Seleium 4.11.0 and browser version 116.0.5845.97. But not able to launch the chrome.

titusfortner commented 1 year ago

@gihanwijesekara46 you do not need WebDriverManager any more in Selenium 4.11. It should not be used.

titusfortner commented 1 year ago

@md-saddamhossain we would need more information about what his happening. Try turning on logging and seeing if that helps explain what Selenium is doing: https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/

md-saddamhossain commented 1 year ago

it is looks like a firewall issue from my system, not allowing to download the needed chromedriver from the server.

Exception in thread "main" org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: Capabilities {browserName: chrome, browserVersion: 116, goog:chromeOptions: {args: [--remote-allow-origins], extensions: []}}, error Command failed with code: 65, executed: [C:\Users\MHossain\AppData\Local\Temp\selenium-manager239862895685008953905734069901697\selenium-manager.exe, --browser, chrome, --output, json, --browser-version, 116] error sending request for url (https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/win64/chromedriver-win64.zip): error trying to connect: tcp connect error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (os error 10060) Build info: version: '4.11.0', revision: '040bc5406b' System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.17' Driver info: driver.version: ChromeDriver

titusfortner commented 1 year ago

@md-saddamhossain is it a constant or intermittent problem? Does the system the code is running on have a proxy that needs to be accounted for?

gihanwijesekara46 commented 1 year ago

Selenium 4.11

@titusfortner Some of them still using this and having error executing test scripts in chrome version 116 that why I created this video I think I posted in the wrong thread. currently chrome driver only support for 114 chrome version. https://chromedriver.chromium.org/downloads

titusfortner commented 1 year ago

If you are using Selenium 4.11 and delete all drivers on the system, it will automatically download and use the right driver. Turn on logging for more information about what you are seeing - https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/

md-saddamhossain commented 1 year ago

@titusfortner I am not sure what is the actual problem here. I tested in two different system one is with proxy restriction and another is without proxy. In both the cases I am unable to open the driver download location. https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/win64/chromedriver-win64.zip

Whereas for Firefox there is no issues in automation script with both the systems.

titusfortner commented 1 year ago

what do the logs show?

github-actions[bot] commented 11 months ago

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.