selenium: [🐛 Bug]: unknown error: cannot find Chrome binary
What happened?
Hi! After driver update it can’t start the browser. Previous driver version 114.0.5735.90 works with no issue. Chrome version - 115.0.5790.98 Chromedriver version - 115.0.5790.98 Selenium Java 4.10.0
https://github.com/GoogleChromeLabs/chrome-for-testing/issues/26
How can we reproduce the issue?
Run any tests with Chrome 115.0.5790.98 and Chromedriver 115.0.5790.98
Relevant log output
Suppressed: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: cannot find Chrome binary
Build info: version: '4.10.0', revision: 'c14d967899'
System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '13.4.1', java.version: '20.0.1'
### Operating System
macos
### Selenium version
4.10.0
### What are the browser(s) and version(s) where you see this issue?
Chrome 115.0.5790.98
### What are the browser driver(s) and version(s) where you see this issue?
115.0.5790.98
### Are you using Selenium Grid?
_No response_
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (9 by maintainers)
Commits related to this issue
- manually set the location of chrome webdriver in macos motivated by https://github.com/seleniumHQ/selenium/issues/12381 — committed to chilli-axe/mpc-autofill by ndepaola a year ago
- update to align with selenium 4.11 two things going on here: * we don't need to manually specify the binary location in macos anymore https://github.com/SeleniumHQ/selenium/issues/12381 * setting t... — committed to chilli-axe/mpc-autofill by ndepaola a year ago
The following command will install chromedriver 114 with homebrew, which is working with chrome 115:
brew install --cask https://raw.githubusercontent.com/Homebrew/homebrew-cask/3ae9f9127a7863a581b79a78a739fb8613442491/Casks/chromedriver.rb
As a workaround in Selenium (and macOS), you can specify the Chrome binary path as follows ChromeOptions options = new ChromeOptions(); options.setBinary(“/Applications/Google Chrome.app/Contents/MacOS/Google Chrome”); Thnx @bonigarcia
Selenium 4.11.0 has been released, please upgrade and this should work.
I also get the same. I don’t think its an Selenium issue, rather an Chromedriver issue. It works fine on Linux but on Mac the Chrome binary can’t be found.
still see the issue on Mac with the new release(4.11.0)! Im not sure if anyone else still sees it despite the change?
Please do that or join our chat to share your code. It takes longer to post things here and wait for answers. https://www.selenium.dev/support/
I also have this error with 115 on Mac. It doesn’t seem to be fixed in 4.11.0.
With 4.10.0 I get this error:
And with 4.11.0 (master) I get this error:
And it’s correct, this file does not exist:
/Users/sam/.gem/ruby/3.2.2/bundler/gems/selenium-0c4880463b82/rb/bin/macos/selenium-manage
The
rb
directory exists, but it does not containbin
directory:Is there some installation stage that is missing when the gem is installed directly from github?
@Akkasim46 yes, that is the Chromium bug linked above.
I still see the issue with chrome version 115 on Mac. org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: cannot find Chrome binary
https://bugs.chromium.org/p/chromium/issues/detail?id=1466427
Yes, looks like there is an issue locating the default Chrome location — https://github.com/GoogleChromeLabs/chrome-for-testing/issues/30
@pmontrasio
WD_CHROME_PATH
is only used by webdrivers, so it shouldn’t do anything if you aren’t requiring the gem. Without webdrivers gem Selenium should be downloading chromedriver v114, which might give a warning, but will still work.