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

unable to download webdriver for chrome version 114.0.5735.248 #566

Closed
jayph88 opened this issue Jul 26, 2023 · 33 comments
Closed

unable to download webdriver for chrome version 114.0.5735.248 #566

jayph88 opened this issue Jul 26, 2023 · 33 comments

Comments

@jayph88
Copy link
Contributor

jayph88 commented Jul 26, 2023

chrome version: Version 114.0.5735.248 (Official Build) widows
webdriver-manager version 3.9.1

Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.2.2\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_exec2.py", line 3, in Exec
    exec(exp, global_vars, local_vars)
  File "<input>", line 1, in <module>
  File "C:\automation_venv\lib\site-packages\webdriver_manager\core\download_manager.py", line 29, in download_file
    response = self._http_client.get(url)
  File "C:\automation_venv\lib\site-packages\webdriver_manager\core\http.py", line 36, in get
    self.validate_response(resp)
  File "C:\automation_venv\lib\site-packages\webdriver_manager\core\http.py", line 15, in validate_response
    raise ValueError(f"There is no such driver by url {resp.url}")
ValueError: There is no such driver by url https://chromedriver.storage.googleapis.com/114.0.5735.248/chromedriver_win32.zip

normally it should be checking for latest driver for current chrome by passing first 3 version numbers
https://chromedriver.storage.googleapis.com/LATEST_RELEASE_114.0.5735 => 114.0.5735.90 then search chromedriver in here
https://chromedriver.storage.googleapis.com/

@jayph88
Copy link
Contributor Author

jayph88 commented Jul 26, 2023

not able to download for v115 as well

image

Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.2.2\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_exec2.py", line 3, in Exec
    exec(exp, global_vars, local_vars)
  File "<input>", line 1, in <module>
  File "C:\automation_venv\lib\site-packages\webdriver_manager\chrome.py", line 39, in install
    driver_path = self._get_driver_binary_path(self.driver)
  File "C:\automation_venv\lib\site-packages\webdriver_manager\core\manager.py", line 33, in _get_driver_binary_path
    file = self._download_manager.download_file(driver.get_driver_download_url())
  File "C:\automation_venv\lib\site-packages\webdriver_manager\drivers\chrome.py", line 59, in get_driver_download_url
    modern_version_url = self.get_url_for_version_and_platform(driver_version_to_download, os_type)
  File "C:\automation_venv\lib\site-packages\webdriver_manager\drivers\chrome.py", line 94, in get_url_for_version_and_platform
    raise Exception(f"No such driver version {browser_version} for {platform}")
Exception: No such driver version 115.0.5790.110 for win32

@p112913
Copy link

p112913 commented Jul 26, 2023

@jayph88 are you using the latest web driver manager version?

@jayph88
Copy link
Contributor Author

jayph88 commented Jul 26, 2023

yes
webdriver-manager==3.9.1

@studioj
Copy link

studioj commented Jul 26, 2023

Exception: No such driver version 115.0.5790.110 for win32
this is normal as there is no driver ...
https://googlechromelabs.github.io/chrome-for-testing/known-good-versions.json

There seems to be many people struggling with this. I think webdriver_manager is doing the right thing here...
The only thing which could still happen is to extend the functionality to also download the correct chrome version and use that in conjuction with the correct chrome driver...
but thats extended functionality...
https://googlechromelabs.github.io/chrome-for-testing/#stable

@SergeyPirogov were there any plans to do this, or was this not done on purpose... (in the end its called webdriver manager and not chrome binary manager)

@morgan9096
Copy link

morgan9096 commented Jul 26, 2023

Google changed version policy.
Explanation
https://chromedriver.chromium.org/downloads/version-selection

For modern version 115 there is json with download links -
https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json

@jayph88
Copy link
Contributor Author

jayph88 commented Jul 26, 2023

Should it be looking for correct chromedriver version in here by looking at first 3 digits of chrome version
https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build.json

and download it from https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json

@SergeyPirogov
Copy link
Owner

Provide a PR

@chrisdruta
Copy link

Interestingly I am able to download and run the correct webdriver on version 3.8.6 for chrome 115, but the latest 3.9.1 doesn't work

@alfablac
Copy link

alfablac commented Jul 26, 2023

I was getting this error but for the v115 version.
But updating to 3.9.1 fixed the issue, so I imagine you only need to bump to 115.0.5790.102.
The problem is that the v3.9.1 introduced another bug, because I can't use a custom path on the chrome driver initialization anymore.

EDIT: 115.0.5790.110 is not on the gogoelchromelabs repository, so that's why it's failing.

@kawsarlog
Copy link

I am facing the same issue!

@SSAdvisor
Copy link

@chermdev won't your solution pull the driver for the first patch set of the version? Wouldn't it better to pull the most recent patch set for the version?

@jayph88
Copy link
Contributor Author

jayph88 commented Jul 27, 2023

@SergeyPirogov
PR

@SergeyPirogov
Copy link
Owner

Try v4.0.0

@GaurangTandon
Copy link

GaurangTandon commented Jul 27, 2023

I worked around this issue by using ChromeDriverManager(version="114.0.5735.16").install() to manually pin the version instead of auto defaulting to latest v115 (you can use a recent version string that works for you and is available on the drivers list page)

@genobear
Copy link

genobear commented Jul 27, 2023

Exception: No such driver version 115.0.5790.110 for win32 this is normal as there is no driver ... https://googlechromelabs.github.io/chrome-for-testing/known-good-versions.json

There seems to be many people struggling with this. I think webdriver_manager is doing the right thing here... The only thing which could still happen is to extend the functionality to also download the correct chrome version and use that in conjuction with the correct chrome driver... but thats extended functionality... https://googlechromelabs.github.io/chrome-for-testing/#stable

@SergeyPirogov were there any plans to do this, or was this not done on purpose... (in the end its called webdriver manager and not chrome binary manager)

I disagree, surely web driver manager should provide the correct URL for downloading. But it gets a bad URL as you say.
You can use this endpoint to get the latest stable version WITH a download available.

https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json

or

https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json

Using these endpoints, the invalid driver(115.0.5790.110) isn't included

If we need to define the version ourselves, surely this defeats the purpose of webdriver manager?

EDIT: Its seems to be fixed in 4.0

@genobear
Copy link

Try v4.0.0

Thanks 4.0.0 fixes the issue of getting an invalid download URL for 115.

Just FYI, the console still refers to the unavailable version in the cache. Doesnt affect functionality as far as I can see.

2023-07-27 12:45:46,414 - INFO -Get LATEST chromedriver version for google-chrome
2023-07-27 12:45:46,489 - INFO -WebDriver version 115.0.5790.102 selected
2023-07-27 12:45:46,490 - INFO -Modern chrome version https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.102/win32/chromedriver-win32.zip
2023-07-27 12:45:46,491 - INFO -About to download new driver from https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.102/win32/chromedriver-win32.zip
2023-07-27 12:45:46,611 - INFO -Driver downloading response is 200
2023-07-27 12:45:49,665 - INFO -Get LATEST chromedriver version for google-chrome
2023-07-27 12:45:49,805 - INFO -Driver has been saved in cache [C:\Users\geno\.wdm\drivers\chromedriver\win64\115.0.5790.110]

@aleksandrvasilyev
Copy link

How to install webdriver-manager version 4.0.0? I have an error when I am trying "pip install webdriver-manager==4.0.0" ERROR: No matching distribution found for webdriver-manager==4.0.0

@SergeyPirogov
Copy link
Owner

@aleksandrvasilyev try now

@aleksandrvasilyev
Copy link

@SergeyPirogov it works, thank you! But now I have another error "selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary" This may be because I am using Chrome version "115.0.5790.114" but the driver doesn't exist for this version.

@SergeyPirogov
Copy link
Owner

Add path to the browser as in example here

def test_chrome_manager_with_selenium():

@SergeyPirogov
Copy link
Owner

Provide details about os and browser version.

@rsclmumbai
Copy link

Its working now. Some issues at my end. Apologies.
Thanks!!

@dbarbuzzi
Copy link

dbarbuzzi commented Jul 27, 2023

I am also running into an issue with Chrome 115 on v4.0.0. Relevant details:

  • macOS 12.5.1
  • Chrome Version 115.0.5790.114 (Official Build) (x86_64)
  • Python 3.10.8
  • webdriver_manager 4.0.0
  • selenium 4.9.0

When running the sample code for Chrome on Selenium 4; I get the following traceback and stacktrace:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/domenic/code/test-automation/website-name/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 84, in __init__
    super().__init__(
  File "/Users/domenic/code/test-automation/website-name/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 104, in __init__
    super().__init__(
  File "/Users/domenic/code/test-automation/website-name/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 286, in __init__
    self.start_session(capabilities, browser_profile)
  File "/Users/domenic/code/test-automation/website-name/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 378, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/Users/domenic/code/test-automation/website-name/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute
    self.error_handler.check_response(response)
  File "/Users/domenic/code/test-automation/website-name/venv/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
Stacktrace:
0   chromedriver                        0x0000000109488a58 chromedriver + 4991576
1   chromedriver                        0x000000010947ffa3 chromedriver + 4956067
2   chromedriver                        0x0000000109032607 chromedriver + 443911
3   chromedriver                        0x00000001090604b7 chromedriver + 631991
4   chromedriver                        0x000000010905f64c chromedriver + 628300
5   chromedriver                        0x00000001090a824c chromedriver + 926284
6   chromedriver                        0x00000001090a75af chromedriver + 923055
7   chromedriver                        0x000000010909e633 chromedriver + 886323
8   chromedriver                        0x000000010906a6f9 chromedriver + 673529
9   chromedriver                        0x000000010906b8de chromedriver + 678110
10  chromedriver                        0x00000001094448a9 chromedriver + 4712617
11  chromedriver                        0x00000001094498b4 chromedriver + 4733108
12  chromedriver                        0x0000000109450799 chromedriver + 4761497
13  chromedriver                        0x000000010944a60a chromedriver + 4736522
14  chromedriver                        0x000000010941d87c chromedriver + 4552828
15  chromedriver                        0x0000000109468c08 chromedriver + 4860936
16  chromedriver                        0x0000000109468d87 chromedriver + 4861319
17  chromedriver                        0x0000000109478edf chromedriver + 4927199
18  libsystem_pthread.dylib             0x00007ff80bee24e1 _pthread_start + 125
19  libsystem_pthread.dylib             0x00007ff80beddf6b thread_start + 15

Update/edit: For what it’s worth, seeing as the error comes from selenium, a chromedriver binary is downloaded for me at /Users/domenic/.wdm/drivers/chromedriver/mac64/115.0.5790.114/chromedriver-mac-x64.

@dbarbuzzi
Copy link

It looks like there is a bug with the M115 chromedriver on macOS specifically which is likely what I’m encountering since webdriver-manager is downloading a correct binary: https://bugs.chromium.org/p/chromium/issues/detail?id=1466427

@kawsarlog
Copy link

You could use the below code for the 114++ Chrome version!
I'm using it it working perfectly for now!

selenium 4

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

option = webdriver.ChromeOptions()
option.add_argument("start-maximized")


driver = webdriver.Chrome(service=Service(ChromeDriverManager(version="114.0.5735.16").install()),options=option)
driver.get('https://www.google.com/')

@3issamben
Copy link

3issamben commented Jul 27, 2023

@kawsarlog I am getting the following error when I use your suggested configuration

START RequestId: 62714e2a-b120-4cb4-90fa-fc578c4f61a8 Version: $LATEST test chrome     ChromeDriverManager(version="114.0.5735.16").install()nexpected keyword argument 'version' END RequestId: 811f87df-b48c-4d5c-8fb4-d0c718b50495

You could use the below code for the 114++ Chrome version! I'm using it it working perfectly for now!

selenium 4

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

option = webdriver.ChromeOptions()
option.add_argument("start-maximized")


driver = webdriver.Chrome(service=Service(ChromeDriverManager(version="114.0.5735.16").install()),options=option)
driver.get('https://www.google.com/')

@SergeyPirogov
Copy link
Owner

Yes, next release I will move unternal code to use pybrowsers

@chermdev
Copy link

chermdev commented Jul 27, 2023

@dbarbuzzi it's a selenium bug SeleniumHQ/selenium#12381 not detecting the Chrome browser location by default in Mac.

As a workaround we can use pybrowsers to get the path of your browser.

pip install pybrowsers

import browsers


path = browsers.get('chrome')['path']

and add the binary path to the options with options.binary_location = browsers.get('chrome')["path"]:

import sys
import browsers
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager


options = webdriver.ChromeOptions()

if sys.platform == "darwin":
    options.binary_location = browsers.get('chrome')["path"]

service = Service(ChromeDriverManager().install())
driver = webdriver.Chrome(options=options, service=service)

reference of the example:

def test_chrome_manager_with_selenium():

@gpark-vs
Copy link

gpark-vs commented Jul 28, 2023

@kawsarlog
Try this without version argument.

- driver = webdriver.Chrome(service=Service(ChromeDriverManager(version="114.0.5735.16").install()),options=option)
+ driver = webdriver.Chrome(service=Service(ChromeDriverManager("114.0.5735.16").install()),options=option)

@gpark-vs
Copy link

gpark-vs commented Jul 28, 2023

@chermdev
With, 4.0.0 and pybrowsers from your solution, multiple process have a conflict.
It keeps saying no cache even though there is a cache at ~/.wdm/drivers/chromedriver/mac64.

It seems that 3.9.11 with ChromeDriverManager("114.0.5735.16").install() having no issue

2023-07-28 12:37:16,161 INFO ====== WebDriver manager ======
2023-07-28 12:37:16,692 INFO Get LATEST chromedriver version for google-chrome
2023-07-28 12:37:16,694 INFO Get LATEST chromedriver version for google-chrome
2023-07-28 12:37:16,694 INFO There is no [mac64] chromedriver "115.0.5790.114" for browser google-chrome "115.0.5790.114" in cache
2023-07-28 12:37:16,716 INFO Get LATEST chromedriver version for google-chrome
2023-07-28 12:37:16,777 INFO WebDriver version 115.0.5790.102 selected
2023-07-28 12:37:16,778 INFO Modern chrome version https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.102/mac-arm64/chromedriver-mac-arm64.zip
2023-07-28 12:37:16,778 INFO About to download new driver from https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.102/mac-arm64/chromedriver-mac-arm64.zip
2023-07-28 12:37:16,857 INFO Driver downloading response is 200
2023-07-28 12:37:21,404 INFO Get LATEST chromedriver version for google-chrome
2023-07-28 12:37:21,502 INFO Driver has been saved in cache [/Users/gpark/.wdm/drivers/chromedriver/mac64/115.0.5790.114]

@SergeyPirogov
Copy link
Owner

There is no such parameter ChromeDriverManager("114.0.5735.16").install()

@justfactINFO
Copy link

This is the Temporary fix for me

@Pfesi
Copy link

Pfesi commented Jul 31, 2023

@dbarbuzzi it's a selenium bug SeleniumHQ/selenium#12381 not detecting the Chrome browser location by default in Mac.

As a workaround we can use pybrowsers to get the path of your browser.

pip install pybrowsers

import browsers


path = browsers.get('chrome')['path']

and add the binary path to the options with options.binary_location = browsers.get('chrome')["path"]:

import sys
import browsers
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager


options = webdriver.ChromeOptions()

if sys.platform == "darwin":
    options.binary_location = browsers.get('chrome')["path"]

service = Service(ChromeDriverManager().install())
driver = webdriver.Chrome(options=options, service=service)

reference of the example:

def test_chrome_manager_with_selenium():

I get an error for this solution, working on macOS

2023-07-31 13:19:21,645 INFO ====== WebDriver manager ======
2023-07-31 13:19:21,769 INFO Get LATEST chromedriver version for google-chrome
2023-07-31 13:19:21,771 INFO Get LATEST chromedriver version for google-chrome
2023-07-31 13:19:21,771 INFO There is no [mac64] chromedriver "114.0.5735.248" for browser google-chrome "114.0.5735.248" in cache
2023-07-31 13:19:21,771 INFO Get LATEST chromedriver version for google-chrome
2023-07-31 13:19:21,772 INFO About to download new driver from https://chromedriver.storage.googleapis.com/114.0.5735.248/chromedriver_mac_arm64.zip

ValueError Traceback (most recent call last)
Cell In [26], line 11
8 if sys.platform == "darwin":
9 options.binary_location = browsers.get('chrome')["path"]
---> 11 service = Service(ChromeDriverManager().install())
12 driver = webdriver.Chrome(options=options, service=service)

File ~/anaconda3/envs/dran/lib/python3.8/site-packages/webdriver_manager/chrome.py:40, in ChromeDriverManager.install(self)
39 def install(self) -> str:
---> 40 driver_path = self._get_driver_binary_path(self.driver)
41 os.chmod(driver_path, 0o755)
42 return driver_path

File ~/anaconda3/envs/dran/lib/python3.8/site-packages/webdriver_manager/core/manager.py:40, in DriverManager._get_driver_binary_path(self, driver)
37 return binary_path
39 os_type = self.get_os_type()
---> 40 file = self._download_manager.download_file(driver.get_driver_download_url(os_type))
41 binary_path = self._cache_manager.save_file_to_cache(driver, file)
42 return binary_path

File ~/anaconda3/envs/dran/lib/python3.8/site-packages/webdriver_manager/core/download_manager.py:29, in WDMDownloadManager.download_file(self, url)
27 def download_file(self, url: str) -> File:
28 log(f"About to download new driver from {url}")
---> 29 response = self._http_client.get(url)
30 log(f"Driver downloading response is {response.status_code}")
31 file_name = self.extract_filename_from_url(url)

File ~/anaconda3/envs/dran/lib/python3.8/site-packages/webdriver_manager/core/http.py:36, in WDMHttpClient.get(self, url, **kwargs)
34 except exceptions.ConnectionError:
35 raise exceptions.ConnectionError(f"Could not reach host. Are you offline?")
---> 36 self.validate_response(resp)
37 return resp

File ~/anaconda3/envs/dran/lib/python3.8/site-packages/webdriver_manager/core/http.py:15, in HttpClient.validate_response(resp)
13 status_code = resp.status_code
14 if status_code == 404:
---> 15 raise ValueError(f"There is no such driver by url {resp.url}")
16 elif status_code == 401:
17 raise ValueError(f"API Rate limit exceeded. You have to add GH_TOKEN!!!")

ValueError: There is no such driver by url https://chromedriver.storage.googleapis.com/114.0.5735.248/chromedriver_mac_arm64.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests