-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[🐛 Bug]: Message: binary is not a Firefox executable #15683
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
Comments
@arghorashy, thank you for creating this issue. We will troubleshoot it as soon as we can. Selenium Triage Team: remember to follow the Triage Guide |
It looks like you are running the Snap version of geckodriver, but a non-Snap version of Firefox? That might be problematic.
That should work (it will download the latest Firefox and geckodriver) Can you please do the following:
|
Thanks for your reply. Per your instructions, I ran this:
In STDOUT I got this:
In my log file I got this output:
|
We need more information about this issue in order to troubleshoot. Please turn on logging and re-run your code. Information on how to adjust logs for your language can be found in our |
@arghorashy Can you try running your code with the @bonigarcia Do you know what is going on here? Based on the code/log shown in #15683 (comment) , shouldn't Selenium Manager not be using the system driver/browser? |
If the user has the location of a driver in the PATH environment variable, that driver will be used. That code is telling Selenium to use the snap driver with a non-snap installation of firefox. |
Someone mentioned that using a non-Snap version of Firefox and a Snap version of geckodriver was part of the problem, so I ran I ran this:
I got this in STDOUT (not the original "binary is not a Firefox executable" message):
I got this in the log file (500 error):
I then tried running
This is what I got in the log file (400 error):
Finally, I decided to pull out the big guns and run I ran the same python commands with the environment variable still set. Here is what I got on the console:
Here is what I got in the log file:
Thanks for your help so far. |
The log looks like it downloaded Firefox and geckodriver (progress!), but Firefox didn't start. Can you verify you are able to run Firefox without Selenium?
Verify geckodriver can start also:
|
The error |
@bonigarcia - In the first post I made, I got the I ran firefox from the That's fair as this is a server, so I ran it gain with the
I ran geckodriver from the |
@arghorashy So it looks like geckodriver starts fine, but Firefox can't... So your issue isn't related to Selenium. I'm not sure why Firefox requires X11/Wayland in headless mode, but you might need to install one of those on your server. Once you can get Firefox to launch, Selenium should work fine. |
I ran I then went run the python code I've been running over and over again and a Firefox browser opened! It's at this point that I realized that I was running the wrong python code for this test! I'd forgotten the
I logged out and logged back in without the
So this wasn't quite right. When I ran The Real ProblemI don't think all the errors I experienced can be attributed to this mistake though... I reinstalled Firefox (
I get this in the log file:
I noticed that now I'm using I wonder if the error message should be made more clear? At least for my system, when I install firefox via apt, I end up with this mixed |
If it was me, I would steer clear of using Snap packaged Firefox and geckodriver and just let Selenium Manager deal with it. |
Remove the snap directory from PATH environment variable Your code is still using the snap driver with a non snap browser |
Even though the log file cites these two paths?
Seems like both are from Snap to me... |
Look at the log file you pasted above. Selenium manager controls the browser location and this is what it is saying it is using:
|
Sorry for the confusion, but if you read the end of my post carefully, you'll see that that log file you are quoting is from the run where I reinstalled Firefox ( Because my post was getting long, I did not post the log file for the final run I tried after running
Just wanted to make sure that it was clear that I didn't need to abandon snap entirely to get my problems to go away. Rather, I just had to ensure I wasn't mismatching snap and non-snap... Of course, I do take your point that it still might be best to just forgo snap altogether. |
Description
I have a python script I have working on one computer, but when I try to run it on my server I get the following error:
Here is the code I'm running:
On my computer where this worked, I didn't need to specify locations for geckodriver or firefox. If I get rid of the arguments to webdriver.Firefox, I get the same result, by the way, so I'm not sure they're doing anything...
Here is some relevant version info for the original computer where this worked:
which geckodriver
returns nothingHere is some version information for the server where I am encountering this issue:
Reproducible Code
Debugging Logs
The text was updated successfully, but these errors were encountered: