kgregor98 / grass

A Docker Image for getgrass.io
GNU General Public License v3.0
77 stars 58 forks source link

Grass exited with code 1 #2

Closed abda11ah closed 10 months ago

abda11ah commented 10 months ago

Hello,

I have just tested the launch of the Grass image on Raspberry 3B arm64 1GB RAM

The debian image downloaded well but grass quit immediately on the first launch.

What do you suggest?

Grass  | Downloading extension...
Grass  | Downloaded! Installing extension and driver manager...
Grass  | Installed! Starting...
Grass  | Traceback (most recent call last):
Grass  |   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 134, in run
Grass  |     completed_proc = subprocess.run(args, capture_output=True)
Grass  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Grass  |   File "/usr/local/lib/python3.12/subprocess.py", line 548, in run
Grass  |     with Popen(*popenargs, **kwargs) as process:
Grass  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Grass  |   File "/usr/local/lib/python3.12/subprocess.py", line 1026, in __init__
Grass  |     self._execute_child(args, executable, preexec_fn, close_fds,
Grass  |   File "/usr/local/lib/python3.12/subprocess.py", line 1950, in _execute_child
Grass  |     raise child_exception_type(errno_num, err_msg, err_filename)
Grass  | OSError: [Errno 8] Exec format error: '/usr/local/lib/python3.12/site-packages/selenium/webdriver/common/linux/selenium-manager'
Grass  | 
Grass  | The above exception was the direct cause of the following exception:
Grass  | 
Grass  | Traceback (most recent call last):
Grass  |   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 38, in get_path
Grass  |     path = SeleniumManager().driver_location(options) if path is None else path
Grass  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Grass  |   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 103, in driver_location
Grass  |     output = self.run(args)
Grass  |              ^^^^^^^^^^^^^^
Grass  |   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 140, in run
Grass  |     raise WebDriverException(f"Unsuccessful command executed: {command}") from err
Grass  | selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: /usr/local/lib/python3.12/site-packages/selenium/webdriver/common/linux/selenium-manager --browser chrome --output json
Grass  | 
Grass  | 
Grass  | The above exception was the direct cause of the following exception:
Grass  | 
Grass  | Traceback (most recent call last):
Grass  |   File "/usr/src/app/./main.py", line 47, in <module>
Grass  |     driver = webdriver.Chrome(options=options)
Grass  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Grass  |   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
Grass  |     super().__init__(
Grass  |   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/chromium/webdriver.py", line 49, in __init__
Grass  |     self.service.path = DriverFinder.get_path(self.service, options)
Grass  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Grass  |   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 41, in get_path
Grass  |     raise NoSuchDriverException(msg) from err
Grass  | selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
Grass  | 
Grass exited with code 1
haoleexrex commented 10 months ago

I think container didn't have chrome or other browser. but i not sure how to solve it.

hope someone can provide dockerfile.

kgregor98 commented 10 months ago

That's right, I haven't have the time to create a workaround that lets me keep the image Alpine-based and with WebDriverManager yet. The Debian image should work on ARM based devices, like the RPI.

kgregor98 commented 10 months ago

New update pushed to both repo and Docker Hub. Try redownloading the image, it should now support ARMv7 / ARM64 out of the box on the :latest tag