-1

I'm facing an error on linux platform initializing Google Chrome.

Method 'inicializaChrome' threw exception. Nested exception is:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: cannot find Chrome binary

I used sugestions, that didn't work. Can someone help me?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

0

This error message...

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: cannot find Chrome binary

...implies that the ChromeDriver binary was unable to find the binary while inititiating a session.


Details

This error can be observed in a couple of cases as follows:

  • Possibly you don't have Google Chrome installed in your system. In that case you have to install Google Chrome as a mandatory measure.

  • Google Chrome is installed in a non-standard location. In that case you have to pass the absolute path of the Google Chrome binary through the setBinary() method as follows:

    ChromeOptions options = new ChromeOptions();
    options.setBinary(/path/to/chrome);
    WebDriver driver = new ChromeDriver(options);
    driver.get("https://www.google.com/");
    

References

You can find a couple of relevant detailed discussions in:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352