Skip to content
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]: Referencing #13894 – Error message: "Binary is not a Firefox executable" when running the Snap-installed version of Firefox. #15556

Closed
boris779 opened this issue Apr 2, 2025 · 3 comments
Labels
B-manager Selenium Manager D-firefox I-defect Something is not working as intended

Comments

@boris779
Copy link
Contributor

boris779 commented Apr 2, 2025

What happened?

The issue still exists, but it's an edge case.
If using Ubuntu and installed firefox with snap, the geckodriver will be automatically installed. And I didn't found a solution to uninstall the snap-installed geckodriver
Seleniummanager detects the snap installed geckodriver , which cannot be used while running your selenium execution.

Workaround is to set the Environment Variable SE_SKIP_DRIVER_IN_PATH = true
Buy the way this Env is not documented, I made an PR (SeleniumHQ/seleniumhq.github.io#2254) for that.

Maybe there should be Warning or an appropriate Message given?

How can we reproduce the issue?

when instancing the driver with Firefoxoptions, the error message occours:


'''
Step failed
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 400. Message: binary is not a Firefox executable 
Host info: host: 'framework', ip: '127.0.1.1'
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.11.0-21-generic', java.version: '22.0.2'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
'''

Relevant log output

boris@framework:~/.cache/selenium/manager/0.4.29$ ./selenium-manager --browser firefox
[2025-04-02T13:51:06.564Z INFO ] Driver path: /snap/bin/geckodriver
[2025-04-02T13:51:06.564Z INFO ] Browser path: /snap/bin/firefox

Operating System

Ubuntu

Selenium version

java 4.28.1

What are the browser(s) and version(s) where you see this issue?

Firefox

What are the browser driver(s) and version(s) where you see this issue?

GeckoDriver 0.36.0

Are you using Selenium Grid?

No

@boris779 boris779 added the I-defect Something is not working as intended label Apr 2, 2025
@boris779 boris779 changed the title [πŸ› Bug]: In reference to #13894 [πŸ› Bug]: Referencing #13894 – Error message: "Binary is not a Firefox executable" when running the Snap-installed version of Firefox. Apr 2, 2025
@titusfortner titusfortner added B-manager Selenium Manager D-firefox labels Apr 2, 2025
@titusfortner
Copy link
Member

@bonigarcia is the right answer to catch this exception and give a more descriptive error?

@bonigarcia
Copy link
Member

Selenium Manager supports Snap browsers (Firefox and Chromium) starting in version 0.4.30 (i.e., Selenium 4.30.0). So the solution should be bumping to this version:

boni@slimbook:~/.cache/selenium/manager/0.4.30$ ./selenium-manager --browser firefox
[2025-04-03T07:20:59.651Z INFO ] Driver path: /snap/bin/geckodriver
[2025-04-03T07:20:59.651Z INFO ] Browser path: /snap/firefox/current/usr/lib/firefox/firefox

@boris779
Copy link
Contributor Author

boris779 commented Apr 3, 2025

Hi Boni!
Thx. I upgraded the dependency. You are right with 0.4.30 it works without the parameter (skip-driver-in-path)

Thx Boris

@boris779 boris779 closed this as completed Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-manager Selenium Manager D-firefox I-defect Something is not working as intended
Projects
None yet
Development

No branches or pull requests

3 participants