1

I use Selenium Python, when I run my crawler I got this error

WebDriverException: Message: chrome not reachable
  (Driver info: chromedriver=2.9.248304,platform=Linux 3.16.0-4-amd64 x86_64)

I read this question

I downloaded chromedriver (binary) and I copy/paste it to /usr/bin I tried by

driver = webdriver.Chrome('/usr/bin/chromedriver')

but I have the same error

parik
  • 1,924
  • 10
  • 36
  • 62
  • does this happen to you when using Firefox? – Yu Zhang Jul 24 '16 at 10:50
  • @YuZhang i can run Firefox by : driver = webdriver.Firefox() – parik Jul 25 '16 at 08:42
  • 1
    In case you're running in docker: [http://stackoverflow.com/questions/28364012/webdriver-exception-chrome-not-reachable](http://stackoverflow.com/questions/28364012/webdriver-exception-chrome-not-reachable) – Josh Jul 25 '16 at 13:31

1 Answers1

1

In your protractor.configuration file, if you have the following:

capabilities: {
    'browserName': 'chrome',
    'chromeOptions': {
      'binary': 'path/to/chromedriver.exe';
    }   },

Then please remove that binary and instead point to the chromdriver like this:

//protractor.conf.js
chromeDriver: "C:/path/to/chromedriver.exe",
capabilities: {
    'browserName': 'chrome',
    'chromeOptions': {

    }
  },

Notice how I removed the 'binary' argument from the capabilities and added the "chromedriver:" attribute.

That worked for me in removing that annoying error that says "

    UnknownError: chrome not reachable
        28-Jul-2016 10:16:57      
    (Driver info: chromedriver=2.19.346078 (6f1f0cde889532d48ce8242342d0b84f94b114a1),
platform=Windows NT 10.0 x86_64)
 (WARNING: The server did not provide any stacktrace information)

Lastly makes sure you update both chromedriver and seleniumServer like this:

webdriver-manager update

OR Run this command below to update to a SPECIFIC chromedriver version i.e v2.24 as of 10/04/2016:

webdriver-manager update --versions.chrome 2.24

if it says that the command is not recognized, then add it to your PATH in windows environment variable. The webdriver-manager generally sits in the Protractor folder which you can get with npm install protractor

byako
  • 3,212
  • 2
  • 18
  • 34
pelican
  • 3,962
  • 6
  • 34
  • 59