SavageCore / HA_Addons

MIT License
4 stars 0 forks source link

selenium exception: Unable to obtain driver for chrome #24

Open alexiri opened 4 days ago

alexiri commented 4 days ago

This addon doesn't start on a rpi4-64 hassio setup:

[11:44:31] INFO: Starting Alexa Shopping List Sync
Traceback (most recent call last):
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 67, in _binary_paths
    output = SeleniumManager().binary_paths(self._to_args())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 47, in binary_paths
    args = [str(self._get_binary())] + args
                ^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 94, in _get_binary
    raise WebDriverException(f"Unsupported platform/architecture combination: {sys.platform}/{arch}")
selenium.common.exceptions.WebDriverException: Message: Unsupported platform/architecture combination: linux/aarch64

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/venv/lib/python3.12/site-packages/seleniumbase/core/browser_launcher.py", line 4723, in get_local_driver
    driver = webdriver.Chrome(options=chrome_options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/chromium/webdriver.py", line 50, in __init__
    if finder.get_browser_path():
       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 47, in get_browser_path
    return self._binary_paths()["browser_path"]
           ^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 78, in _binary_paths
    raise NoSuchDriverException(msg) from err
selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 67, in _binary_paths
    output = SeleniumManager().binary_paths(self._to_args())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 47, in binary_paths
    args = [str(self._get_binary())] + args
                ^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 94, in _get_binary
    raise WebDriverException(f"Unsupported platform/architecture combination: {sys.platform}/{arch}")
selenium.common.exceptions.WebDriverException: Message: Unsupported platform/architecture combination: linux/aarch64

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/main.py", line 39, in <module>
    driver = Driver(headless=True)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/seleniumbase/plugins/driver_manager.py", line 749, in Driver
    driver = browser_launcher.get_driver(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/seleniumbase/core/browser_launcher.py", line 2440, in get_driver
    return get_local_driver(
           ^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/seleniumbase/core/browser_launcher.py", line 4799, in get_local_driver
    driver = webdriver.Chrome(
             ^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/chromium/webdriver.py", line 50, in __init__
    if finder.get_browser_path():
       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 47, in get_browser_path
    return self._binary_paths()["browser_path"]
           ^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 78, in _binary_paths
    raise NoSuchDriverException(msg) from err
selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location

s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
SavageCore commented 21 hours ago

What distro are you using?