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

Incorrect Handling of Chrome Version < 113 in Webdriver_Manager v4.0.0 #581

Closed
shenchucheng opened this issue Jul 30, 2023 · 3 comments
Closed

Comments

@shenchucheng
Copy link

In Webdriver_Manager v4.0.0, there is a bug in the get_latest_release_version() method of the chrome.py file. The issue occurs when the determined_browser_version is less than 113. In this case, the code incorrectly uses the full version number (X.X.X.X format) to fetch the latest release version, resulting in an unexpected error. For example, it may raise a ValueError with a message like: "There is no such driver by url https://chromedriver.storage.googleapis.com/LATEST_RELEASE_94.0.4606.54".

To address this issue, the code can be updated as follows:

    ...
    def get_latest_release_version(self):
        determined_browser_version = self.get_browser_version_from_os()
        log(f"Get LATEST {self._name} version for {self._browser_type}")
        if determined_browser_version is not None and version.parse(determined_browser_version) >= version.parse("113"):
            return determined_browser_version
        # Remove the build version (the last segment) from determined_browser_version
        determined_browser_version = ".".join(determined_browser_version.split(".")[:3])
        latest_release_url = (
            self._latest_release_url
            if (determined_browser_version is None)
            else f"{self._latest_release_url}_{determined_browser_version}"
        )
        resp = self._http_client.get(url=latest_release_url)
        return resp.text.rstrip()
@mjblue
Copy link
Contributor

mjblue commented Jul 31, 2023

I am also seeing this issue in v3.9.1 using chrome 112

@mjblue
Copy link
Contributor

mjblue commented Jul 31, 2023

raised a PR for this: #583

@mjblue
Copy link
Contributor

mjblue commented Aug 1, 2023

@SergeyPirogov now the fix for this has been merged, how do we go about getting a 4.0.1 release tagged?

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

3 participants