[🐛 Bug]: ERROR error sending request for url (https://chromedriver.storage.googleapis.com/LATEST_RELEASE_108): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
What happened?
Dec 10, 2022 1:30:28 PM org.openqa.selenium.remote.service.DriverService findExecutable WARNING: Unable to obtain driver using Selenium Manager: Unsuccessful command executed: [C:\Users<user>\AppData\Local\Temp\selenium-manager17283176393723006992415082342136659\selenium-manager.exe, --driver, chromedriver] WARN Sending fatal alert BadCertificate ERROR error sending request for url (https://chromedriver.storage.googleapis.com/LATEST_RELEASE_108): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
Build info: version: '4.7.1', revision: 'c6795baf1a3' System info: os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_341' Driver info: driver.version: unknown
How can we reproduce the issue?
Using Selenium Manager 4.7.1 to launch chrome v108
Relevant log output
Dec 10, 2022 1:30:28 PM org.openqa.selenium.remote.service.DriverService findExecutable
WARNING: Unable to obtain driver using Selenium Manager: Unsuccessful command executed: [C:\Users\<user>\AppData\Local\Temp\selenium-manager17283176393723006992415082342136659\selenium-manager.exe, --driver, chromedriver]
WARN Sending fatal alert BadCertificate
ERROR error sending request for url (https://chromedriver.storage.googleapis.com/LATEST_RELEASE_108): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
Build info: version: '4.7.1', revision: 'c6795baf1a3'
System info: os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_341'
Driver info: driver.version: unknown
Operating System
Windows
Selenium version
4.7.1
What are the browser(s) and version(s) where you see this issue?
chrome 108
What are the browser driver(s) and version(s) where you see this issue?
NA
Are you using Selenium Grid?
4.7.1
@vicozohili, 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!
Workaround, switch pom to release 4.6.0, run test to launch chrome then switch back to 4.7.1 and browser seems to launch.
It seems a connectivity problem related to the TLS certificate when trying to connect to the chromedriver online repository:
invalid peer certificate: UnknownIssuer
Maybe it is a temporary problem.
@vicozohili Is it working now, right?
@bonigarcia On a daily basis since the issue was raised, I get the invalid peer certificate error and have to revert to 4.6.0 and then back to 4.7.1 before it starts working again.
I would like to know if this issue is consistent with version 4.7.x at your end. @vicozohili: To check that, could you please do the following?
- Clear the Selenium Manager cache, i.e., remove the folder
C:\Users\<your-user>\.cache\selenium - Rerun your tests using Selenium 4.7.x
And share the results here. Thanks.
@bonigarcia , I performed the above steps and the result is still the same
Dec 17, 2022 3:10:19 PM org.openqa.selenium.remote.service.DriverService findExecutable WARNING: Unable to obtain driver using Selenium Manager: Unsuccessful command executed: [C:\Users<user>\AppData\Local\Temp\selenium-manager23391045110620002025040880721906655\selenium-manager.exe, --driver, chromedriver] WARN Sending fatal alert BadCertificate ERROR error sending request for url (https://chromedriver.storage.googleapis.com/LATEST_RELEASE_108): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
Build info: version: '4.7.2', revision: '4d4020c3b7' System info: os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_341' Driver info: driver.version: unknown
In addition, I also include clearing of C:\Users<user>\AppData\Local\Temp with no luck until I performed the said workaround of reverting back to 4.6.0 and then back to 4.7.x
@bonigarcia would it be a good idea to print Selenium Manager's version in the log?
So far the Manager version is dependent on Selenium version, so shouldn't matter at this point...
@vicozohili
- it sounds like you have a proxy on your machine, can you verify?
- When you switch back to 4.6 then upgrade to 4.7 does it stop working again the next day?
@titusfortner , see response below it sounds like you have a proxy on your machine, can you verify? Not a proxy, but connecting via company VPN When you switch back to 4.6 then upgrade to 4.7 does it stop working again the next day? Yes
@bonigarcia selenium manager version is 4.7.2
The Selenium Manager logs show the following:
WARN Sending fatal alert BadCertificate
ERROR error sending request for url (https://chromedriver.storage.googleapis.com/LATEST_RELEASE_108): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
I looked into that, and it seems a problem related to rustls. It happens in Selenium Manager 4.7 since we moved from native TLS (used in version 4.6) to rusttls (to avoid shared libraries issues). I have just committed a patch to try to solve it for the next release of Selenium Manager:
https://github.com/SeleniumHQ/selenium/compare/trunk...se_mgr_http_client
@vicozohili Could you please try to debug it? To do it, please download selenium-manager_windows-x64, execute the following, and share the results here. Thanks in advance:
selenium-manager --browser chrome --debug --clear-cache
@bonigarcia see below for results of executing selenium-manager --browser chrome --debug --clear-cache
C:\Users<user>\Downloads>selenium-manager --browser chrome --debug --clear-cache DEBUG Clearing cache at: C:\Users<user>.cache\selenium DEBUG Using shell command to find out chrome version DEBUG Running cmd command: "wmic datafile where name='%PROGRAMFILES:\=\\%\\Google\\Chrome\\Application\\chrome.exe' get Version /value" DEBUG Output { status: ExitStatus(ExitStatus(0)), stdout: "\r\r\n\r\r\n\r\r\n", stderr: "No Instance(s) Available.\r\r\n" } DEBUG Running cmd command: "wmic datafile where name='%PROGRAMFILES(X86):\=\\%\\Google\\Chrome\\Application\\chrome.exe' get Version /value" DEBUG Output { status: ExitStatus(ExitStatus(0)), stdout: "\r\r\n\r\r\nVersion=108.0.5359.125\r\r\n\r\r\n\r\r\n\r\r\n", stderr: "" } DEBUG The version of chrome is 108.0.5359.125 DEBUG Detected browser: chrome 108 DEBUG Reading chromedriver version from https://chromedriver.storage.googleapis.com/LATEST_RELEASE_108 DEBUG starting new connection: https://chromedriver.storage.googleapis.com/ DEBUG No cached session for DnsName(DnsName(DnsName("chromedriver.storage.googleapis.com"))) DEBUG Not resuming any session DEBUG Using ciphersuite TLS13_AES_256_GCM_SHA384 DEBUG Not resuming DEBUG TLS1.3 encrypted extensions: [] DEBUG ALPN protocol is None DEBUG Ticket saved DEBUG Ticket saved DEBUG Required driver: chromedriver 108.0.5359.71 DEBUG Driver URL: https://chromedriver.storage.googleapis.com/108.0.5359.71/chromedriver_win32.zip DEBUG starting new connection: https://chromedriver.storage.googleapis.com/ DEBUG Resuming session DEBUG Using ciphersuite TLS13_AES_256_GCM_SHA384 DEBUG Resuming using PSK DEBUG TLS1.3 encrypted extensions: [] DEBUG ALPN protocol is None DEBUG Ticket saved DEBUG File extracted to C:\Users<user>.cache\selenium\chromedriver\win32\108.0.5359.71\chromedriver.exe (12358144 bytes) INFO C:\Users<user>.cache\selenium\chromedriver\win32\108.0.5359.71\chromedriver.exe
C:\Users<user>\Downloads>
Great, thanks a lot, @vicozohili. It seems the new change fixes the issue.
I have just created a PR about it (#11449). It will be available for the next version of Selenium.
@bonigarcia Great thanks. Will look out for the next version.
Is this issue fixed? I still see it reproducible with 4.7.2 version.
WARNING: Unable to obtain driver using Selenium Manager: Unsuccessful command executed: [C:\Users\username\AppData\Local\Temp\selenium-manager56723551864420016803617694157295156\selenium-manager.exe, --driver, chromedriver] WARN Sending fatal alert BadCertificate ERROR error sending request for url (https://chromedriver.storage.googleapis.com/LATEST_RELEASE_108): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
My code is running behind company VPN
@santhosh0419 Please try with Selenium 4.8.0, released today.
@bonigarcia Thanks for pointing to it. Its working with Selenium 4.8.0.
Thanks for confirming, @santhosh0419.
@SeleniumHQ team, I would like to know any plans to mark Selenium Manager the stable version (to my knowledge there are no active issues, you can correct me). We do use the latest version in many of our projects, but to push it to few of the projects client needs stable version. Thank you.
I think this was closed too quickly. The issue still exists with selenium 4.8.0
Jan 24, 2023 1:14:37 PM org.openqa.selenium.remote.service.DriverService findExecutable WARNING: Unable to obtain driver using Selenium Manager: Unsuccessful command executed: [C:\Users<user>\AppData\Local\Temp\selenium-manager177642339278600389374573545870465\selenium-manager.exe, --driver, chromedriver] WARN Sending fatal alert BadCertificate ERROR error sending request for url (https://chromedriver.storage.googleapis.com/LATEST_RELEASE_109): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
Build info: version: '4.8.0', revision: '267030adea' System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.5' Driver info: driver.version: unknown
It was closed because we got feedback, but if it is still happening, we can reopen.