Session not created exception: Chrome version must be >= 62.0.3202.0

We were also using chromedriver-helper. I think Circle updating their images was a coincidence.

In my circle config, I added chromedriver-update 2.34 before the test run. This version is compatible with the older version of Chrome that’s installed. Installing a newer version of Chrome should also fix it.

1 Like

You can just use apt-get to update the chromedriver.

-run
    name: Update Chromedriver
    command: |
        sudo apt-get update
        sudo apt-get install google-chrome-stable
2 Likes

I couldn’t get any of the above fixes to work for me. I managed to fix it by downloading and installing the package directly from Google like so:

  - run:
      name: Install Chrome
      command: |
        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

Thanks dude! This is the only thing that worked for me as well.

I also needed to add a sudo apt install libappindicator3-1 before. So it’s:

- run:
    name: Install Chrome
    command: |
      sudo apt install -y libappindicator3-1
      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
1 Like

this worked for me - because of missing libs

- run:
      name: Install Chrome
      command: |
        wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
        sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
        sudo apt-get update
        sudo apt-get -y install google-chrome-stable
3 Likes

This is an issue for me running Protractor end-to-end tests for an Angular CLI application.

I attempted the following steps with unsatisfactory results:

  1. Update Chrome: sudo apt-get update && sudo apt-get -y install google-chrome-stable
    This did not work because the latest stable version of Chrome is 64, but ChromeDriver 2.38 wants Chrome >= 65.0.3325.0.
  2. Add a build step that runs the shell command chromedriver-update 2.34.
    This did not work because the command chromedriver-update does not exist.
  3. Add a build step that runs the shell command webdriver-manager update --versions.chrome 2.35 (from here).
    This did not work because webdriver-manager is not available on the system.

As the previous few posts mention, I could go back to manually patching the local apt lists and installing the latest version of Chrome that way. I am hesitant to do so, however, because simply using the image circleci/node:9-stretch-browsers is much simpler than copying and pasting four lines of code (and having to run apt-get update) to every project’s CircleCI config.yml.

Running image circleci/node:8-browsers.

Today we’re getting:
SessionNotCreatedError: session not created exception: Chrome version must be >= 65.0.3325.0 (Driver info: chromedriver=2.38.551591 (bcc4a2cdef0f6b942b2bb8049068f65340fa2a69),platform=Linux 4.4.0-119-generic x86_64).

This issue crops up nearly every time there is a new release of Google Chrome, and we have been unable to get any of the solutions listed here to work, so each time we’re at the mercy of waiting for the docker image to update its bundled version of Chrome.

I notice that on https://hub.docker.com/r/circleci/node/ it describes the -browsers images as “extends the defacto image and installs Firefox and Chrome/chromedriver and configure them to run in a chrontainzied [sic] environment” - but ChromeDriver does not appear to be installed on the image. Would it be possible to bundle that into the image? Then they can be updated in unison, instead of relying on the client to download a version of ChromeDriver that works for the bundled Chrome version (or trying to force Chrome to update at each run, defeating the purpose of using the -browsers image).

3 Likes

We’re getting it too. However, we’re running image circleci/ruby:2.4.3-node-browsers

I don’t use these images, but I wonder if it comes about because the driver and the browser are out of sync? If so, can someone try pinning the driver to a fixed version?

If the driver is changing because the base images are changing, I wonder if a custom image would help here? One can create a Docker image containing the versions of things that are needed, and then stick with that until one decides that a new one is necessary.

Just use this solution

works perfectly for me

1 Like

A custom image would most certainly solve the issue, but if users need to build and manage their own image just because the tooling in the -browsers images isn’t updated frequently enough, then it defeats the purpose of Circle offering them

1 Like

Personally speaking, I see it as the opposite problem: given the number of problems that are reported in this forum, I think they are updated too frequently. I take the view that browser tests should test the general principle of a UI - if folks want to test across a wide range of browsers (or a frequently changing set of browsers) then traditional CI isn’t appropriate. Either folks maintain the images themselves (duplicated work) or they are updated centrally (more breakages on edge cases).

Maybe BrowserStack or similar would be better?

(All IMO, of course :smiley_cat: ).

If you use the chromedriver-helper gem, you can specify a version to use: https://github.com/flavorjones/chromedriver-helper#specifying-a-version

In my case, setting the version to 2.37 fixed the issue. You can see the PR here: https://github.com/18F/identity-idp/pull/2108

2 Likes

Thanks, Setting Chromedriver.set_version '2.37' in my base test fixed the issue.

1 Like

I used this code to upgrade google chrome version:
`

This did not work because webdriver-manager is not available on the system.

You need to run webdriver-manager from your node_modules bin folder.

You could do $(npm bin)/webdriver-manager to run it, or just include it as part of your script for running your e2e tests in your package.json.

"test:e2e": "webdriver-manager update --versions.chrome 2.37; protractor protractor.conf.js"

// or
"pretest:e2e": "webdriver-manager update --versions.chrome 2.37",
"test:e2e": "protractor protractor.conf.js"

after loads of surfing on circle threads about chromedriver issues, this one just did the trick. thx so much

worked for me, until started to use VCR.

So with rspec+vcr, Chromedriver.set_version '2.37' is not required, works by using an answer above (@Pepan) :

- run:
      name: Install Chrome
      command: |
        wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
        sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
        sudo apt-get update
        sudo apt-get -y install google-chrome-stable

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