chimp icon indicating copy to clipboard operation
chimp copied to clipboard

Error Chrome not reachable

Open vishal0532 opened this issue 10 years ago • 20 comments

Expected behaviour

Script should be running & opening chrome browser instance & navigating to the url

Actual behaviour

Getting error as "Error Chrome not reachable"

Exact steps to reproduce / repository that demonstrates the problem

Please put long code snips in a Gist and provide a link here. I have prepared a step_def.js file having the below code snippet module.exports = function() {

this.Given(/^I have visited the website$/, function () { browser.url('http://google.com'); }); } When i start chimp through the command chimp --watch then i get the below error Failures:

  1. Scenario: Search for Xolv.io - features\search.feature:8 Step: Given I have visited the website - features\search.feature:9 Step Definition: features\support\step_defs.js:3 Message: Error: chrome not reachable
Version & tools:
  • Chimp command line used: The exact command you used
  • Chimp config file: Please provide a Gist if you use a config file
  • Chimp: 0.41.2
  • Node.js: v6.9.1
  • Java: 1.8
  • Operation system: Windows 7 Node.js: Java: 1.8
Console / Log Output

Please put long logs in a Gist and provide a link here.


Join our Slack xolv.io/community #chimp channel, where you can find help and help others.

vishal0532 avatar Nov 18 '16 09:11 vishal0532

What version chromedriver are you using?

StephenDavidson avatar Dec 05 '16 11:12 StephenDavidson

closing this due to no response from @vishal0532

SamHatoum avatar Dec 15 '16 13:12 SamHatoum

I'm getting this same error

{ [Error: unknown error: cannot find Chrome binary
  (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 3.19.0-25-generic x86_64)]
  message: 'unknown error: cannot find Chrome binary\n  (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 3.19.0-25-generic x86_64)',
  type: 'RuntimeError',
  seleniumStack:
   { status: 13,
     type: 'UnknownError',
     message: 'An unknown server-side error occurred while processing the command.',
     orgStatusMessage: 'unknown error: cannot find Chrome binary\n  (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 3.19.0-25-generic x86_64)' } }
Error: unknown error: cannot find Chrome binary
    at initBrowser (node_modules/chimp/dist/lib/chimp-helper.js:162:17)
    at Object.setupBrowserAndDDP (node_modules/chimp/dist/lib/chimp-helper.js:231:7)
    at Context.<anonymous> (node_modules/chimp/dist/lib/mocha/mocha-helper.js:11:15)
    at node_modules/chimp/dist/lib/utils/fiberize.js:25:14
    (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 3.19.0-25-generic x86_64)

I'm attempting to use the version of chromedriver available through npm, and then link it within various bin directories. When I run chromedriver --version, I get ChromeDriver 2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e)

merlinstardust avatar Dec 15 '16 19:12 merlinstardust

this is a different error I think. Do you have chrome installed?

SamHatoum avatar Dec 15 '16 19:12 SamHatoum

Well I thought I could just get the chromedriver and skip installing Chrome, which is why I installed it from npm.

But that didn't work, so I ran wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb and then sudo dpkg -I google-chrome-stable_current_amd64.deb to install Chrome, and it's still the same error

merlinstardust avatar Dec 15 '16 19:12 merlinstardust

well chromedriver saves you from needing selenium & java. It's the webdriver basically however it still needs Chrome

What is the error now?

SamHatoum avatar Dec 15 '16 19:12 SamHatoum

It's still the same error as above.

Can you tell me where chimp expects the chromedriver to be and how to use the configuration file to set the path?

I tried with this config file but it didn't work

module.exports = {
  webdriverio: {
    desiredCapabilities: {
      browserName: 'chrome',
      chromeOptions: {binary: '/usr/bin/chromedriver'},
    },
  },
};

merlinstardust avatar Dec 15 '16 19:12 merlinstardust

I believe its' this:

desiredCapabilities: {
        browserName: 'chrome',
        chromeOptions: {
            binary: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
        }
    }

SamHatoum avatar Dec 15 '16 19:12 SamHatoum

Apologies I should have specified, I'm running this on Ubuntu 14.04.3 LTS.

So I don't need module.exports or webdriverio specified?

merlinstardust avatar Dec 15 '16 19:12 merlinstardust

my bad, I was being lazy...

module.exports = {
  webdriverio: {
    desiredCapabilities: {
        browserName: 'chrome',
        chromeOptions: {
            binary: '<path to your chrome binary>'
        }
    }
}

SamHatoum avatar Dec 15 '16 19:12 SamHatoum

Yes, that's what I do have, and it's not working.

merlinstardust avatar Dec 15 '16 20:12 merlinstardust

hmm. try this:

start chromedriver with this:

then run this:

chromedriver --url-base=wd/hub --verbose

then in another tab/window

curl -XPOST http://localhost:9515/wd/hub/session -d '{"desiredCapabilities":{"browserName":"chrome"}}'

SamHatoum avatar Dec 15 '16 20:12 SamHatoum

this way you can debug the issue without Chimp being part of the equation

SamHatoum avatar Dec 15 '16 20:12 SamHatoum

This is what I get when I start it without chimp

Starting ChromeDriver 2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e) on port 9515
Only local connections are allowed.
[14.443][INFO]: COMMAND InitSession {
   "desiredCapabilities": {
      "browserName": "chrome"
   }
}
[14.449][INFO]: RESPONSE InitSession unknown error: cannot find Chrome binary
[14.450][DEBUG]: Log type 'driver' lost 0 entries on destruction
[14.450][DEBUG]: Log type 'browser' lost 0 entries on destruction

merlinstardust avatar Dec 15 '16 20:12 merlinstardust

are you able to start chrome manually?

SamHatoum avatar Dec 15 '16 20:12 SamHatoum

If by that you mean click the icon to open, I can't do that. I'm attempting to do this headlessly in a vagrant set up virtual machine

merlinstardust avatar Dec 15 '16 20:12 merlinstardust

I mean from the command line. Have you started Xvfb?

Also, it would be better if you come to http://xolv.io/community

SamHatoum avatar Dec 15 '16 20:12 SamHatoum

@samhatoum Thank you so much for your quick help! I was able to get it working. As it turns out, the the capital -I flag was for getting info, not installing. Once Chrome installed, it did work. Thank you again.

merlinstardust avatar Dec 15 '16 20:12 merlinstardust

great to hear. you're welcome

SamHatoum avatar Dec 15 '16 21:12 SamHatoum

This issue is being tracked in Chimpy https://github.com/TheBrainFamily/chimpy/issues

SamHatoum avatar Nov 09 '18 19:11 SamHatoum