Selenium Chromedriver on Nightwatch e2e issues

Hi, I’m trying to port over my project from codeship and I’m having some trouble setting up Nightwatch.

I have a nightwatch configuration file that uses the npm package selenium-download to grab a standalone selenium server and chromedriver.

That works fine, as evidenced by:

$ node nightwatch.conf.js
[testium] grabbing selenium standalone server 2.53.0
[testium] grabbing selenium chromedriver 2.29
✔ Selenium & Chromedriver downloaded to: ./node_modules/nightwatch/bin/

I double-checked by ssh’ing into the build and indeed, the chromedriver and selenium.jar file were in the bin folder.

Then I went onto running the e2e test cases, but I’m getting a curious error:

Error retrieving a new session from the selenium server

Connection refused! Is selenium server started?

This is the error.value.localizedMessage:

localizedMessage: 'session not created exception: Chrome version must be >= 56.0.2884.0\n  (Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 3.13.0-107-generic x86_64)

It seems to me from the error message that there’s a chrome driver mismatch somewhere, which I tried to remedy by using the commands found here, and stuck that in my pre-dependency script. Same error message though.

Any ideas what’s going on here?

EDIT: Solved this issue. Figured out that the builds have Chrome pre-installed, but the version is 54.somethingsomething, which is not what I needed. I added these scripts to my circle.yml file:

dependencies:
  pre:
    - curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    - sudo dpkg -i google-chrome.deb
    - sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
    - rm google-chrome.deb

Leaving this topic up just in case it helps someone else.

1 Like