How does the node-?-browsers image work?

nodejs
browsers
circle.yml

#1

I am having problems getting my browser-tests to work. It seems there is a problem connecting to chromedriver. My build script is downloading chromedriver itself, but the documentation about the image node-7.10-browsers states that chromedriver should already be installed. Is chromedriver also already running? on what port? If not, where is chromedriver installed?

Does anyone have a good working example on how to run browser tests on node.js that I can look at?

Our failing build is from our open source virtual DOM framework maquette. The sourcecode can be found here on github. The build steps run perfectly on my local machine.

Help would be appreciated!


#2

Hey Johan,

This has to do with the old version of chrome (Google Chrome 58.0.3029.110) that comes with that container. Running locally on (Google Chrome 62.0.3202.62) confirmed working just like you.

I upgraded in a fork and the tests passed.

I sent a PR to your repo with the workaround.

Confirmed working here: https://circleci.com/gh/levlaz/maquette/5


#3

Super! thanks!


WebGL, Three.js and ChromeDriver UI-Test
#4

Pasting the full error here for folks coming from Google. :slight_smile:

starting server on port 8000


  todomvc-maquette
Starting selenium
Starting /home/circleci/repo/browser-tests/node_modules/chromedriver/lib/chromedriver/chromedriver
> Starting ChromeDriver 2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4) on port 9515
Only local connections are allowed.

 > CALL init() 
    1) "before all" hook


  0 passing (932ms)
  1 failing

  1) todomvc-maquette "before all" hook:
     Error: [init()] The environment you requested was unavailable.
      at node_modules/wd/lib/webdriver.js:134:15
      at Request._callback (node_modules/wd/lib/http-utils.js:88:7)
      at Request.self.callback (node_modules/request/request.js:186:22)
      at Request.<anonymous> (node_modules/request/request.js:1081:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1001:12)
      at endReadableNT (_stream_readable.js:975:12)
      at _combinedTickCallback (internal/process/next_tick.js:80:11)
      at process._tickCallback (internal/process/next_tick.js:104:9)

The hint was The environment you requested was unavailable. – this happens when chrome is not installed and I suppose in this case, when a minimum version is not met.


#5

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.