-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛 Bug]: Trying to launch Firefox webdriver #10813
Comments
@cleconte987, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Cannot recreate this on ubuntu; how exactly did you install import logging
logging.basicConfig(level=logging.DEBUG)
# <run your script code here> I would like the see the HTTP request/response logging when trying to create the new session. Passing your geckodriver path like that while in theory should work; can you also try it with an absolute path? Thanks. |
I edited my post to add the information you asked. I tried modifying geckodriver to absolute path but didn't change outcome. I installed Ubuntu recently and Firefox was shipped with it. I installed geckodriver from github/mozilla/geckodriver |
Same problem here. Ubuntu 22.04, Firefox 101.0.1, geckodriver 0.31.0, selenium 4.3.0. Firefox installed with sudo apt-get install firefox The code (works under Windows): import logging from selenium import webdriver driver = webdriver.Firefox() Log output: DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:48201/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts": true, "moz:debuggerAddress": true, "pageLoadStrategy": "normal"}}} |
Thanks both; could you try installing firefox through different means on ubuntu and see if the problem persists? the |
Which installation method is recommended for headless Ubuntu VPS (no GUI)? |
I uninstalled Firefox which was installed through snap. I then installed it through apt. Apt also installed it through snap in the end. I tried to relaunch WebDriver then but it didn't change anything. |
from what I can find, it looks like |
Ok thank you very much! |
seeing this in an automated unit-test case using MacOs. https://github.com/justpy-org/justpy/actions/runs/3053721493/jobs/4924707114
|
Geckodriver has a set list of places it looks for Firefox, perhaps it isn't finding it, or is finding the wrong one. Try explicitly specifying the path of Firefox you want to use with the |
This is not reproducible. Sometimes the tests works and sometimes it doesn't. Since the test configuration stays the same i doubt that the Firefox path is the problem. I assume this is a far more subtle problem. |
Looks like there are a number of potential solutions listed here — https://stackoverflow.com/questions/72374955/failed-to-read-marionette-port-when-running-selenium-geckodriver-firefox-a The error is coming from geckodriver, though, not from Selenium, so underlying issue will need to be addressed with Mozilla. |
Hi, @cleconte987. You can see if the feature is passing in the Web Platform Tests. If it is something new, please create an Issue with the GeckoDriver team. Feel free to comment the issues that you raise back in this issue. Thank you. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
I tried to launch Firefox webdriver with python API, to retrieve information on a web page. Previously I was using this code snippet on a Mac and everything was working fine. When switching to Linux I changed the geckodriver binary to be the one for Linux.
But I got this issue where it says it doesn't find the marionette port.
I saw this thread on stackoverflow: https://stackoverflow.com/questions/72374955/failed-to-read-marionette-port-when-running-selenium-geckodriver-firefox-a which I thought might be related to my problem.
So I tried to run the script in super user mode. It didn't change anything
[EDIT]
I installed Ubuntu about 10 days ago from an iso image from ubuntu.com: https://ubuntu.com/download/desktop/thank-you?version=22.04&architecture=amd64 and Firefox was already installed with it.
I downloaded geckodriver from https://github.com/mozilla/geckodriver/releases and copied it in some directory in my project. I also tried to put it at some moment in /usr/bin but it didn't change anything.
I tried right now by changing geckodriver path to be absolute: "/home/clement/Desktop/mobilite-electrique.tech/bin". It did the same result.
The code snippet is the following:
`from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.firefox.options import Options as FirefoxOptions
How can we reproduce the issue?
Relevant log output
Operating System
Ubuntu 22.04
Selenium version
4.3.0
What are the browser(s) and version(s) where you see this issue?
Firefox 101.0.1 (64 bits)
What are the browser driver(s) and version(s) where you see this issue?
geckodriver v0.31.0 linux 64
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: