[🐛 Bug]: Contained Firefox can't be used on MacOS
See original GitHub issueWhat happened?
For the project https://github.com/robocorp/rpaframework/ we’re installing an isolated Firefox and adding that to the path. But because as seen here https://github.com/SeleniumHQ/selenium/blob/dab928e6ac2c270b03d0199f381950c998c3f8b0/py/selenium/webdriver/firefox/firefox_binary.py#L152 the path for MacOS is hardcoded and not searched for in $PATH, Selenium will never find and use that version.
How can we reproduce the issue?
Install Firefox on MacOS in a different path. Add it to the $PATH global variable and try to use Selenium against it. Selenium will fail, not being able to find Firefox.
Relevant log output
SessionNotCreatedException: Message: Expected browser binary location, but unable to find binary
Operating System
MacOS Monterey 12.3
Selenium version
3.141.0 (but based on the code seems like it should be on all versions)
What are the browser(s) and version(s) where you see this issue?
Firefox 98, 99 and 100
What are the browser driver(s) and version(s) where you see this issue?
GeckoDriver 0.30.0
Are you using Selenium Grid?
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Mac 11.4 Unable to connect to websites | Firefox Support Forum
I have been unable to use Firefox on a site that I have used for years. ... I cannot figure out how to...
Read more >Firefox won't open on new Mac OS - profile cannot be found
I have a new Mac and have not been able to open FF. I just get this message: "your firefox profile cannot be...
Read more >Firefox can't load websites but other browsers can
We'll explain errors such as "Server not found" or "Unable to connect" and how to fix problems where Firefox can't access websites but...
Read more >I cannot install the new version of firefox in mi mac os x system ...
I cannot install the new version of firefox in mi mac os x system. It says that i do not have the permission...
Read more >Problems loading pages (macOS Big Sur 11.1) - Mozilla Support
3 replies; 2 have this problem; 841 views; Last reply by FredMcD. 1 year ago ... Yesterday I got a new Mac, running...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not sure the problem is in GeckoDriver. This works well on Windows and Linux because (I assume) Gecko calculates the paths properly.
Usually the convention is to take each folder from
$PATH
in order and try to use the binary from there, that’s why the order is important. From what I see, this is done by Selenium on Linux using thewhich
method here: https://github.com/SeleniumHQ/selenium/blob/dab928e6ac2c270b03d0199f381950c998c3f8b0/py/selenium/webdriver/firefox/firefox_binary.py#L211I think this should be the best approach for MacOS as well, if the binary couldn’t be found in the path currently hardcoded: https://github.com/SeleniumHQ/selenium/blob/dab928e6ac2c270b03d0199f381950c998c3f8b0/py/selenium/webdriver/firefox/firefox_binary.py#L153
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.