Error Chrome not reachable
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:
- 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.
What version chromedriver are you using?
closing this due to no response from @vishal0532
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)
this is a different error I think. Do you have chrome installed?
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
well chromedriver saves you from needing selenium & java. It's the webdriver basically however it still needs Chrome
What is the error now?
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'},
},
},
};
I believe its' this:
desiredCapabilities: {
browserName: 'chrome',
chromeOptions: {
binary: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
}
}
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?
my bad, I was being lazy...
module.exports = {
webdriverio: {
desiredCapabilities: {
browserName: 'chrome',
chromeOptions: {
binary: '<path to your chrome binary>'
}
}
}
Yes, that's what I do have, and it's not working.
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"}}'
this way you can debug the issue without Chimp being part of the equation
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
are you able to start chrome manually?
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
I mean from the command line. Have you started Xvfb?
Also, it would be better if you come to http://xolv.io/community
@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.
great to hear. you're welcome
This issue is being tracked in Chimpy https://github.com/TheBrainFamily/chimpy/issues