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

dependency problem - webdriver_manager 3.8.1 #278

Closed
malmiteria opened this issue Jul 13, 2022 · 12 comments
Closed

dependency problem - webdriver_manager 3.8.1 #278

malmiteria opened this issue Jul 13, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@malmiteria
Copy link

there's been a recent update of webdriver_manager (3.7.1 to 3.8.1)

This trigger some errors in pylenium as seen here :

/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pylenium/driver.py:362: in visit
    self.webdriver.get(url)
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pylenium/driver.py:235: in webdriver
    return self.init_webdriver() if self._webdriver is None else self._webdriver
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pylenium/driver.py:203: in init_webdriver
    self._webdriver = webdriver_factory.build_from_config(self.config)
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pylenium/webdriver_factory.py:147: in build_from_config
    return build_chrome(seleniumwire_options=config.driver.seleniumwire_options, **_config)
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/pylenium/webdriver_factory.py:196: in build_chrome
    service=ChromeService(local_path or ChromeDriverManager(version=version).install()),
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/webdriver_manager/chrome.py:38: in install
    driver_path = self._get_driver_path(self.driver)
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/webdriver_manager/core/manager.py:33: in _get_driver_path
    file = self._download_manager.download_file(driver.get_url())
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/webdriver_manager/core/download_manager.py:28: in download_file
    response = self._http_client.get(url)
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/webdriver_manager/core/http.py:32: in get
    self.validate_response(resp)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
resp = <Response [404]>
    @staticmethod
    def validate_response(resp: requests.Response):
        status_code = resp.status_code
        if status_code == 404:
>           raise ValueError(f"There is no such driver by url {resp.url}")
E           ValueError: There is no such driver by url https://chromedriver.storage.googleapis.com/latest/chromedriver_linux64.zip
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/webdriver_manager/core/http.py:15: ValueError

the fix would be to limit the dependency to before 3.8.1 for webderiver_manager

@ElSnoMan ElSnoMan added the bug Something isn't working label Jul 13, 2022
@ElSnoMan
Copy link
Owner

I've had a few people report the same issue! Thank you for taking the time to create the Issue here so we can track it. I will get a fix and new version published soon

@rnestler
Copy link
Contributor

I encountered the same issue.

the fix would be to limit the dependency to before 3.8.1 for webderiver_manager

But isn't this a bug that should be reported to webdriver_manager?

@ElSnoMan
Copy link
Owner

I believe this is a bug for webdriver_manager. I wanted to make sure it wasn't anything from Pylenium's side before dismissing it.

If you can work around the issue by downgrading webdriver_manager, then this bug belongs in their repo

@malmiteria
Copy link
Author

I posted an issue on their repo too, I wanted to do that initially but ended up short on time : SergeyPirogov/webdriver_manager#412

I encountered the same issue.

the fix would be to limit the dependency to before 3.8.1 for webderiver_manager

But isn't this a bug that should be reported to webdriver_manager?

It's possible it's a bug from webdriver_manager, but it's also possible it comes from unexpected use here in pylenium, so idk where's the source of that bug
And idk if downgrading is the only fix, i didn't get much time to investigate tbh

@mwonderful-idbydna
Copy link

I encountered the same problem webdriver-manager 3.8.0

@ElSnoMan
Copy link
Owner

ElSnoMan commented Jul 15, 2022

Downgrade a major version, not minor please. 3.7.x
Let me know what you get! 😄

@mwonderful-idbydna
Copy link

Yes, 3.7.0 was available on both Mac and Linux.

@chingc
Copy link
Contributor

chingc commented Sep 8, 2022

The workaround is to update "version": "latest" to "version": "" in pylenium.json.

This problem is probably related to SergeyPirogov/webdriver_manager#386.

@marksmayo
Copy link
Contributor

Ran into this as well, ended up hacking around by hardcoding the download temporarily. Version:"" would have been simpler ;)

@asimsheikh
Copy link

Had this issue too. @chingc your workaround worked like a charm for me. Thankyou very much.

@ElSnoMan
Copy link
Owner

Finally getting to this myself. I updated webdriver-manager to v3.8.4 and set "version": "" and it worked! This is great news 🎉

For now, I will set "version": "" as the default for pylenium.json and push it up to fix this. Thanks to all of you for helping 🙏🏽

@rnestler
Copy link
Contributor

rnestler commented Jun 1, 2023

With the https://github.com/SergeyPirogov/webdriver_manager/releases/tag/v3.8.6 release I had again to specify the version as "latest" in the json for it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants