mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.03k stars 1.51k forks source link

Failed to read marionette port using Firefox version 121.0 and GeckoDriver version 0.33.0 on Linux ubuntu 6.5.0-1008-raspi #2146

Closed ptn77 closed 5 months ago

ptn77 commented 6 months ago

System

Testcase

tested using both selenium and seleniumwire webdriver to get to any url: from selenium import webdriver

from seleniumwire import webdriver

from selenium.webdriver.firefox.options import Options from selenium.webdriver.firefox.service import Service from selenium.webdriver.firefox.firefox_binary import FirefoxBinary from webdriver_manager.firefox import GeckoDriverManager

binary = FirefoxBinary(r'/usr/local/bin/firefox') service = Service(executable_path='/usr/local/bin/geckodriver', firefox_binary=binary) options = Options() options.add_argument('--headless') options.log.file = '~/geckodriver.log' options.log.level = "trace" driver = webdriver.Firefox(options=options, service=service) driver.get(url)

Stacktrace

Traceback (most recent call last): driver = webdriver.Firefox(options=options, service=service) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in init super().init(command_executor=executor, options=options) in init self.start_session(capabilities) in start_session response = self.execute(Command.NEW_SESSION, caps)["value"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ , in execute self.error_handler.check_response(response) , in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message: Failed to read marionette port

Trace-level log

No tracelogs produced

whimboo commented 6 months ago

We clearly need the trace log from the produced geckodriver.log

ptn77 commented 6 months ago

I tried to set the log configuration in the python file, but it didn't generate the file. Do you have any other suggestions on how I can get it to generate the log file? options.log.file = '~/geckodriver.log' options.log.level = "trace"

ptn77 commented 6 months ago

Looks like it has to do with the snap install issue. I tried this https://askubuntu.com/questions/1399383/how-to-install-firefox-as-a-traditional-deb-package-without-snap-in-ubuntu-22/1404401#1404401

whimboo commented 6 months ago

Did you exactly use both geckodriver and firefox from the snap package? Or was one or the other not part of the snap?

whimboo commented 5 months ago

No further reply from reporter. Closing the issue.