-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-defectSomething is not working as intendedSomething is not working as intended
Description
What happened?
I installed selenium by pip, installed firefox by apt, installed geckodriver downloading the aarch64 version.
I created the sym links for firefox and geckodriver to use with PATH.
I tried to exec a simple script to use headless firefox, but selenium is trying to use linux64 version instead of aarch64.
I tried to put the aarch64 geckodriver in the linux64 folder but I get another error too.
Executing the geckodriver command, looks like is working:
1696334921102 geckodriver INFO Listening on 127.0.0.1:4444
How can we reproduce the issue?
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.service import Service
options = Options()
options.headless = True
service = Service(executable_path=GeckoDriverManager().install())
driver = webdriver.Firefox(service=service, options=options)
driver.get("https://www.google.com")
print("Headless Firefox Initialized")
driver.quit()Relevant log output
Traceback (most recent call last):
File "/home/pi/scripts/python/s.py", line 16, in <module>
driver = webdriver.Firefox(service=service, options=options)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/firefox/webdriver.py", line 60, in __init__
self.service.start()
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/common/service.py", line 98, in start
self._start_process(self._path)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/common/service.py", line 204, in _start_process
self.process = subprocess.Popen(
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/pi/.wdm/drivers/geckodriver/linux64/v0.33.0/geckodriver'
Changing the geckodriver from linux64 to aarch64:
Traceback (most recent call last):
File "/home/pi/scripts/python/s.py", line 16, in <module>
driver = webdriver.Firefox(service=service, options=options)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/firefox/webdriver.py", line 67, in __init__
super().__init__(command_executor=executor, options=options)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 205, in __init__
self.start_session(capabilities)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 289, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py", line 344, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 1Operating System
orange pi 5 ubuntu Linux opi5 5.10.110-rockchip-rk3588 #23.02.2 SMP Fri Feb 17 23:59:20 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
Selenium version
4.13.0
What are the browser(s) and version(s) where you see this issue?
Mozilla Firefox 115.3.0esr
What are the browser driver(s) and version(s) where you see this issue?
geckodriver 0.33.0 (a80e5fd61076 2023-04-02 18:31 +0000)
Are you using Selenium Grid?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-defectSomething is not working as intendedSomething is not working as intended