selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Not able to launch Chrome 116.x version with Selenium 4.11[🐛 Bug]:

Open debomitaInfosys opened this issue 3 years ago • 21 comments

What happened?

I am using Selenium version: 4.11, with Chrome browser Version 116.0.5845.97 I am not using webdriver manager.

My code: Webdriver driver; ChromeOptions options = new ChromeOptions(); options.addArguments("--disable-infobars"); options.addArguments("--remote-allow-origins=*"); driver = new ChromeDriver(options);

driver.get("https://google.com");

How can we reproduce the issue?

Webdriver driver;
ChromeOptions options = new ChromeOptions();
options.addArguments("--disable-infobars");
 options.addArguments("--remote-allow-origins=*");
driver = new ChromeDriver(options);

driver.get("https://google.com");

Relevant log output

org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [--headless, --no-sandbox, --disable-infobars, --remote-allow-origins=*], extensions: [], prefs: {profile.default_content_setting_values.notifications: 1}}}, error Command failed with code: 65, executed: [C:\Users\debomita.b\AppData\Local\Temp\selenium-manager393590558668001515354363940359410\selenium-manager.exe, --browser, chrome, --output, json]
Unsuccessful response (403 Forbidden) for URL https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/win64/chromedriver-win64.zip
Build info: version: '4.11.0', revision: '040bc5406b'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.7'
Driver info: driver.version: ChromeDriver

Operating System

Windows 11

Selenium version

4.11

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

Selenium version: 4.11, with Chrome browser Version 116.0.5845.97

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

Selenium version: 4.11, with Chrome browser Version 116.0.5845.97

Are you using Selenium Grid?

nO

debomitaInfosys avatar Aug 21 '23 15:08 debomitaInfosys

@debomitaInfosys, 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 Aug 21 '23 15:08 github-actions[bot]

403 Forbidden

Looks like you are behind a proxy. You need to specify the proxy in your options class for Selenium Manager to pick it up and use it.

titusfortner avatar Aug 21 '23 17:08 titusfortner

download selenium 4.11 https://pypi.org/project/selenium/#files And overwrite the selenium manager that you downloaded. selenium > webdriver > commom > [YOUR OS] > selenium-manager

jihwankim255 avatar Aug 22 '23 02:08 jihwankim255

Issue with your network or you are behind a Proxy. Connect with some other network or wifi or mobile data. It will solve this issue. @debomitaInfosys

naveenanimation20 avatar Aug 22 '23 04:08 naveenanimation20

I am getting the same problem . I have tested with different network also .But same problem I am getting . But when try to access this url directly then I am not getting 403 .the chromed driver is downloading in my system with same network. https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/win64/chromedriver-win64.zip

Srinishiv avatar Aug 22 '23 07:08 Srinishiv

Thanks everyone for the response. However, I have tired all the options, getting the same error.

debomitaInfosys avatar Aug 22 '23 08:08 debomitaInfosys

I checked chromedriver, but I did not find the driver of 116 (Because my English is not good, the above content is Google translation)

LINKlang avatar Aug 22 '23 10:08 LINKlang

@debomitaInfosys this happens every time, not intermittently? Can you curl that file from the command line with the same user?

@Srinishiv same with you. What user is running the code and can that same user get that file with curl directly?

@LINKlang the location of the drivers have changed, update to Selenium 4.11

titusfortner avatar Aug 22 '23 11:08 titusfortner

@debomitaInfosys this happens every time, not intermittently? Can you curl that file from the command line with the same user?

@Srinishiv same with you. What user is running the code and can that same user get that file with curl directly?

@LINKlang the location of the drivers have changed, update to Selenium 4.11

How to update, I tried the following code, but it is not useful pip install --upgrade selenium

LINKlang avatar Aug 22 '23 12:08 LINKlang

@titusfortner Yes, this issue every time, not intermittently. getting below error on curl that file: curl https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/win64/chromedriver-win64.zip

curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.

debomitaInfosys avatar Aug 22 '23 12:08 debomitaInfosys

image getting this error when i try with curl . but directly from browser getting the file.

Srinishiv avatar Aug 22 '23 12:08 Srinishiv

Found this

This error is also commonly hit when you're on a corporate network that performs MITM on all traffic, and then blocks the revocation check

So that indicates that your network is not allowing all traffic to pass through. You need to talk to your system administrator / network security teams to figure out if there is a proxy or something else that needs to be specified.

If you can't sort it out, you'll need to continue to manage drivers yourself. There's not much Selenium can do to assist with this limitation.

titusfortner avatar Aug 22 '23 13:08 titusfortner

@debomitaInfosys can you try using an older version of chrome? Maybe 115? I might have a similar issue where older versions are working.

erik-rnbt avatar Aug 22 '23 17:08 erik-rnbt

I wasn't able to open Chrome with version 4.8.3 of Selenium, but once I upgraded to version 4.11.2, Selenium opened Chrome just fine.

kburchfiel avatar Aug 23 '23 00:08 kburchfiel

I'm facing similar issue on personal mac with no proxies set.

kaurmanjot90 avatar Aug 26 '23 23:08 kaurmanjot90

Versions older than 115 are located in a different spot. If 114 is working and 115 isn't, it's possible that the old location was put in an allow-list.

To troubleshoot network related errors:

  1. Turn on logging: https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/
  2. See if the error is network related
  3. Figure out why your network doesn't like that location

I'll add links to places to ask additional questions.

titusfortner avatar Aug 26 '23 23:08 titusfortner

💬 Please ask questions at:

github-actions[bot] avatar Aug 26 '23 23:08 github-actions[bot]

We were also facing similar issue, since our project was also running behind proxy. Below code fixed the issue for us.

Proxy proxy = new Proxy();
proxy.setAutodetect(true); // true or false depends on system proxy settings
//proxy.setHttpproxy("some.host.com:8081/");
proxy.setSslProxy("some.host.com:8081/");
  
//chromeOptions.setBinary("C:\\Program Files (x86)...\\chrome.exe"); //may be needed some times if chrome binary is not in C:\\Program Files...
chromeOptions.setProxy(proxy);
driver = new ChromeDriver(chromeOptions);

Selenium version 4.11.0 | Chrome version:116.x

MynkModi avatar Aug 28 '23 18:08 MynkModi

Thank you

debomitaInfosys avatar Aug 29 '23 00:08 debomitaInfosys

update selenium to 4.12.0. it will fix the issue

chishay88 avatar Sep 06 '23 17:09 chishay88