pyleniumio icon indicating copy to clipboard operation
pyleniumio copied to clipboard

dependency problem - webdriver_manager 3.8.1

Open malmiteria opened this issue 3 years ago • 9 comments

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

malmiteria avatar Jul 13 '22 09:07 malmiteria

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

ElSnoMan avatar Jul 13 '22 16:07 ElSnoMan

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?

rnestler avatar Jul 14 '22 09:07 rnestler

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

ElSnoMan avatar Jul 14 '22 17:07 ElSnoMan

I posted an issue on their repo too, I wanted to do that initially but ended up short on time : https://github.com/SergeyPirogov/webdriver_manager/issues/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

malmiteria avatar Jul 15 '22 07:07 malmiteria

I encountered the same problem webdriver-manager 3.8.0

mwonderful-idbydna avatar Jul 15 '22 21:07 mwonderful-idbydna

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

ElSnoMan avatar Jul 15 '22 22:07 ElSnoMan

Yes, 3.7.0 was available on both Mac and Linux.

mwonderful-idbydna avatar Jul 18 '22 15:07 mwonderful-idbydna

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

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

chingc avatar Sep 08 '22 02:09 chingc

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

marksmayo avatar Sep 14 '22 21:09 marksmayo

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

asimsheikh avatar Sep 28 '22 01:09 asimsheikh

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 🙏🏽

ElSnoMan avatar Oct 18 '22 17:10 ElSnoMan

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.

rnestler avatar Jun 01 '23 12:06 rnestler