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

latest chromium version not found #637

Open
bandophahita opened this issue Oct 13, 2023 · 9 comments
Open

latest chromium version not found #637

bandophahita opened this issue Oct 13, 2023 · 9 comments

Comments

@bandophahita
Copy link

bandophahita commented Oct 13, 2023

The latest chromium version is 120.0.6066 but get_latest_release_version() cannot find the build version.

  File "/Users/me/.pyenv/versions/myproject/lib/python3.11/site-packages/webdriver_manager/core/driver.py", line 48, in get_driver_version_to_download
    return self.get_latest_release_version()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/me/.pyenv/versions/myproject/lib/python3.11/site-packages/webdriver_manager/drivers/chrome.py", line 61, in get_latest_release_version
    determined_browser_version = response_dict.get("builds").get(determined_browser_version).get("version")
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

It would appear that https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build.json (which the function uses to determine versions) does not contain the latest chromium version... yet.

It would seem that we need an alternate way to lookup the latest version of chromium.

@thejacket
Copy link

Overall the whole thing seems buggy. Experiencing the same thing on latest versions of Edge and Brave as well.

@sinnrrr
Copy link

sinnrrr commented Oct 15, 2023

Same here, but different error

  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/atlant_bot/parser.py", line 19, in get_driver
    print(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_
    driver_path = self._get_driver_binary_path(self.driver)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_
    file = self._download_manager.download_file(driver.get_driver_download_url(os_type))
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_
manager/drivers/chrome.py", line 32, in get_driver_download_url
    driver_version_to_download = self.get_driver_version_to_download()
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_
manager/core/driver.py", line 48, in get_driver_version_to_download
    return self.get_latest_release_version()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_
manager/drivers/chrome.py", line 64, in get_latest_release_version
    determined_browser_version = ".".join(determined_browser_version.split(".")[:3])
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'

UPD: After installing the Chromium browser to the system, have an error, which looks closer to the one described in the issue:

  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/atlant_bot/parser.py", line 22, in get_driver
    ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install()
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_manager/chrome.py", line 40, in install
    driver_path = self._get_driver_binary_path(self.driver)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_manager/core/manager.py", line 35, in _get_driver_binary_path
    binary_path = self._cache_manager.find_driver(driver)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_manager/core/driver_cache.py", line 105, in find_driver
    driver_version = self.get_cache_key_driver_version(driver)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_manager/core/driver_cache.py", line 152, in get_cache_key_driver_version
    return driver.get_driver_version_to_download()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_manager/core/driver.py", line 48, in get_driver_version_to_download
    return self.get_latest_release_version()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dmytro.soltusyuk/Work/personal/atlant_bot/.venv/lib/python3.11/site-packages/webdriver_manager/drivers/chrome.py", line 61, in get_latest_release_version
    determined_browser_version = response_dict.get("builds").get(determined_browser_version).get("version")
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

@bandophahita
Copy link
Author

What this tells me is trying to use google's release version json isn't sufficient for chromium releases. Which, I think, makes some sense since chromium releases before google does. The question is, is there a release source for chromium that can be used instead?

@bandophahita
Copy link
Author

What is really nuts about this is you can pull down the 'latest' version of chromium here : https://download-chromium.appspot.com/?platform=Mac_Arm&type=snapshots

..but the version you get doesn't even appear on https://omahaproxy.appspot.com/

Which is one of the sources mentioned for trying to find the version you want on the chromium documentation site: https://www.chromium.org/getting-involved/download-chromium/

@bandophahita
Copy link
Author

This issue is compounded by the fact that installers like homebrew use this same source to install chromium on mac.

I'm curious if it would be a completely terrible idea to pull down the 'closest match' chromedriver in these cases?

@AlbertoFDR
Copy link

IDK exactly if it's your case, but in version 4.10 of Selenium, Selenium Manager is included by default.
More Info: https://stackoverflow.com/a/76725606

@devsosin
Copy link

when i use ChromeDriverManager on ubuntu docker
i have installed chromium

then i get this kind of error
bash cmd cannot find google-chrome

I think ChromeDriverManager have to use two chrome_type options

webdriver_manager/core/os_manager.py

class ChromeDriverManager(DriverManager):
    def __init__(
            self,
            ...
            chrome_type: list = [ChromeType.GOOGLE, ChromeType.CHROMIUM],
    ):

@bandophahita
Copy link
Author

@Devosin that would be a different problem.

@bandophahita
Copy link
Author

IDK exactly if it's your case, but in version 4.10 of Selenium, Selenium Manager is included by default. More Info: https://stackoverflow.com/a/76725606

@AlbertoFDR I appreciate the suggestion, even if it basically advises to ditch using this library.
But I opened #637 to help fix a problem with webdriver_manager.

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

5 participants