philippnormann / nvidia-sniper

🎯 Autonomously buy Nvidia Founders Edition GPUs as soon as they become available.
394 stars 99 forks source link

Fails to launch due to updated geckodriver #120

Closed justincbeck closed 3 years ago

justincbeck commented 3 years ago

Running the application on a mac throws the following exception:

2021-04-09 07:48:57 INFO: Launching Firefox using default profile: Profiles/czaiq70n.default-release

Traceback (most recent call last):
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Volumes/external_storage/workspace/personal/nvidia-sniper/sniper/__main__.py", line 285, in <module>
    loop.run_until_complete(main())
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/Volumes/external_storage/workspace/personal/nvidia-sniper/sniper/__main__.py", line 99, in main
    driver = webdriver.create()
  File "/Volumes/external_storage/workspace/personal/nvidia-sniper/sniper/webdriver.py", line 54, in create
    driver = webdriver.Firefox(
  File "/Users/jbeck/.local/share/virtualenvs/nvidia-sniper-MM7d3iO9/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in __init__
    self.service.start()
  File "/Users/jbeck/.local/share/virtualenvs/nvidia-sniper-MM7d3iO9/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 86] Bad CPU type in executable: '/Users/jbeck/.wdm/drivers/geckodriver/macos/v0.29.1/geckodriver'

I went through the motions of clearing out all my installed dependencies and trying again but I get the same error. I read somewhere that, with the introduction of the M1 chip, this is a known issue. I think there's a library in the project somewhere that has a dependency on an outdated version of something else that isn't compatible with the newer gecko driver.

But since the Pipfile doesn't specify versions, I'm not sure that there is a quick fix. I experienced this on multiple computers (both macs).

Unfortunately (for everyone, including me), I don't have time to dig further.

justincbeck commented 3 years ago

NOTE: I also deleted the Pipfile.lock file so it would grab the latest version of all the libraries. That didn't resolve anything either.

xpbeyo commented 3 years ago

Alright I found the solution to this. I replace the geckodriver at ~/.wdm/drivers/geckodriver/macos/v0.29.1/with geckodriver-v0.29.1-macos.tar.gz. You can download it here: https://github.com/mozilla/geckodriver/releases

justincbeck commented 3 years ago

Yup, that did it... Nice work.