4

Currently I'm using the follow stack:

 1. Selenium Webdriver 3.0.1 (NodeJS API) 
 2. Mocha
 3. Chromedriver 2.25.3

Often when I run my tests in Codeship (continuous integration) I get this error:

Uncaught WebDriverError: chrome not reachable
(Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.2.0-42-generic x86_64)

Note: This never happened running locally, only occurs when my tests start in codeship, and it's an intermittent error (sometimes it happens, sometimes not)

Screenshot error:

enter image description here

Any ideia how solve this?

Rafael C.
  • 2,245
  • 4
  • 29
  • 45

1 Answers1

-1

Does codeship have chrome installed on their test server?

I'm guessing not. It might be better to run this against phantomjs (headless browser) instead for CI purposes.

Peter Grainger
  • 4,539
  • 1
  • 18
  • 22
  • every time the tests run and a VM is started, the chrome is installed via `npm`. I don't think it's a good alternative to change all my tests for headless browser, after all, this is supposed to work. There must be some way to fix this. – Rafael C. Dec 16 '16 at 20:38
  • I didn't realise there was a chrome npm, that is pretty cool. Is it this you are using? https://www.npmjs.com/package/chrome. I normally use docker to run my CI with firefox and chrome: https://github.com/SeleniumHQ/docker-selenium. – Peter Grainger Dec 18 '16 at 07:16
  • I'm not sure what your issue is here.... have you tried running this locally without chrome installed and relying on the npm module, it might help you debug what the issue is. I haven't had any experience with the chrome npm module but the error looks like the chrome is not running. It's hard to figure out without your full config. How do you run chrome using this module? The chromedriver just connects to chrome on a port it wont run chrome for you. – Peter Grainger Dec 18 '16 at 07:20