MarketSquare / webdrivermanager

Python module to facilitate downloading and deploying WebDriver binaries for Chrome, Firefox, Opera & Edge
https://pypi.org/project/webdrivermanager/
MIT License
100 stars 38 forks source link

Failure to download new release (0.27.0) of geckodriver #35

Closed progwriter closed 4 years ago

progwriter commented 4 years ago

geckodriver made a new release that includes signature (.asc) files in the list of assets. This breaks the detection of what file to download (see https://github.com/rasjani/webdrivermanager/blob/77485c05d5dd81642a5ee0002167c2fe69bf5538/webdrivermanager/webdrivermanager.py#L176-L179)

rasjani commented 4 years ago

Thanks for the report. Without even checking the code, this is valid issue.

pushkargr commented 4 years ago

Is there any alternative way to download the drivers while this is getting fixed?

rasjani commented 4 years ago

@progwriter could you share what actually happens when the code executes on your environment because i can't seem to reproduce this on OSX when downloading either osx or windows binaries ..

progwriter commented 4 years ago

Ah, yes. The issue pops up for linux only because of geckodriver-v0.27.0-linux64.tar.gz.asc and geckodriver-v0.27.0-linux32.tar.gz.asc. Not clear to me why they chose not to sign osx/win binaries.

You can force it to happen on osx by doing webdrivermanager firefox --os linux in which case you'll hit the following stack trace:

Downloading WebDriver for browser: "firefox"
Error, unable to determine correct filename for 64bit linux
Traceback (most recent call last):
  File "/Users/victor/.pyenv/versions/bfe/bin/webdrivermanager", line 8, in <module>
    sys.exit(main())
  File "/Users/victor/.pyenv/versions/bfe/lib/python3.7/site-packages/webdrivermanager/cli.py", line 47, in main
    extracted_binary, link = downloader.download_and_install(version)
  File "/Users/victor/.pyenv/versions/bfe/lib/python3.7/site-packages/webdrivermanager/webdrivermanager.py", line 266, in download_and_install
    filename_with_path = self.download(version, show_progress_bar=show_progress_bar)
  File "/Users/victor/.pyenv/versions/bfe/lib/python3.7/site-packages/webdrivermanager/webdrivermanager.py", line 222, in download
    (download_url, filename) = self.get_download_url(version)
  File "/Users/victor/.pyenv/versions/bfe/lib/python3.7/site-packages/webdrivermanager/webdrivermanager.py", line 370, in get_download_url
    url = self._parse_github_api_response(version, response)
  File "/Users/victor/.pyenv/versions/bfe/lib/python3.7/site-packages/webdrivermanager/webdrivermanager.py", line 179, in _parse_github_api_response
    raise_runtime_error('Error, unable to determine correct filename for {0}bit {1}'.format(self.bitness, self.os_name))
  File "/Users/victor/.pyenv/versions/bfe/lib/python3.7/site-packages/webdrivermanager/webdrivermanager.py", line 34, in raise_runtime_error
    raise RuntimeError(msg)
RuntimeError: Error, unable to determine correct filename for 64bit linux
rasjani commented 4 years ago

Not released yet. Uploading later today still.

tvasenin commented 4 years ago

@rasjani Could you pls release a new version and upload it to PyPI?

rasjani commented 4 years ago

0.9.0 is in the pypi now..