0

I got error of chromedriver version is only support google chrom version 100.

My current google chrome is 109

Current browser version is 109.0.5414.119 with binary path /usr/bin/google-chrome
[13:12:27] I/file_manager - creating folder /home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/webdriver-manager/selenium
[13:12:27] I/config_source - curl -o/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/
ℹ 「wdm」: Compiled successfully.
[13:12:28] I/downloader - curl -o/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/webdriver-manager/selenium/chromedriver_100.0.4896.20.zip https://chromedriver.storage.googleapis.com/100.0.4896.60/chromedriver_linux64.zip
[13:12:28] I/update - chromedriver: unzipping chromedriver_100.0.4896.20.zip
[13:12:29] I/update - chromedriver: setting permissions to 0755 for /home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/webdriver-manager/selenium/chromedriver_100.0.4896.20
[13:12:30] I/launcher - Running 1 instances of WebDriver
[13:12:30] I/direct - Using ChromeDriver directly...
[13:12:30] E/launcher - session not created: This version of ChromeDriver only supports Chrome version 100
Current browser version is 109.0.5414.119 with binary path /usr/bin/google-chrome
  (Driver info: chromedriver=100.0.4896.60 (6a5d10861ce8de5fce22564658033b43cb7de047-refs/branch-heads/4896@{#875}),platform=Linux 5.10.0-19-cloud-amd64 x86_64)
[13:12:30] E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 100
Current browser version is 109.0.5414.119 with binary path /usr/bin/google-chrome
  (Driver info: chromedriver=100.0.4896.60 (6a5d10861ce8de5fce22564658033b43cb7de047-refs/branch-heads/4896@{#875}),platform=Linux 5.10.0-19-cloud-amd64 x86_64)
    at Object.checkLegacyResponse (/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/selenium-webdriver/lib/error.js:546:15)
    at parseHttpResponse (/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/selenium-webdriver/lib/http.js:509:13)
    at /home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/selenium-webdriver/lib/http.js:441:30
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
From: Task: WebDriver.createSession()
    at Function.createSession (/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
    at Function.createSession (/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/selenium-webdriver/chrome.js:761:15)
    at Direct.getNewDriver (/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/protractor/built/driverProviders/direct.js:77:33)
    at Runner.createBrowser (/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/protractor/built/runner.js:195:43)
    at /home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/protractor/built/runner.js:339:29
    at _fulfilled (/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/q/q.js:834:54)
    at /home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/q/q.js:863:30
    at Promise.promise.promiseDispatch (/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/q/q.js:796:13)
    at /home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/q/q.js:556:49
    at runSingle (/home/gitlab-runner/builds/qkFs1r9o/0/root/front/node_modules/q/q.js:137:13)
[13:12:30] E/launcher - Process exited with error code 199
An unexpected error occurred: undefined
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: Job failed: exit status 1

How can i specific version of chromedrive to download? This is my protractor config:

// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');

exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    './src/**/*.e2e-spec.ts'
  ],
  capabilities: {
    'browserName': 'chrome',
    chromeOptions: {
      args: ["--headless", "--disable-gpu", "--window-size=800x600", "--no-sandbox", "--disable-dev-shm-usage", "--disable-extensions"]
    }
  },
  directConnect: true,
  baseUrl: 'http://localhost:4200/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
  },
  onPrepare() {
    require('ts-node').register({
      project: require('path').join(__dirname, './tsconfig.e2e.json')
    });
    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
  }
};

Specific version of chromedrive to download with protractor

  • Did you search stack overflow? This issue occurs quite often because webdrivers have to match the chrome browser version exactly and have to be updated manually. See e.g. https://stackoverflow.com/questions/39823677/protractor-webdriver-manager-chromedriver-update – Loop Feb 07 '23 at 13:40

2 Answers2

0

The error:

session not created: This version of ChromeDriver only supports Chrome version 100
Current browser version is 109.0.5414.119 with binary path /usr/bin/google-chrome

Solution

In your case the installed version of Chrome is 109.0.5414.119, but the ChromeDriver only supports up to version 100. To resolve the issue, you should upgrade your ChromeDriver to a version that supports Chrome 109.0.5414.119 or downgrade your Google Chrome to version 100.

URL for chromeDriver is here

Akzy
  • 1,817
  • 1
  • 7
  • 19
  • But I am using ansible to install chrome on a VM and run e2e on gitlab-ci, so have no opiton install them manually – Thi Hien Pham Feb 07 '23 at 14:03
  • You can use role in Ansible to install `Google Chrome` and `ChromeDriver` – Akzy Feb 07 '23 at 14:10
  • - name: Install chromedriver shell: cd /tmp/; wget https://chromedriver.storage.googleapis.com/109.0.5414.74/chromedriver_linux64.zip; unzip chromedriver_linux64.zip; mv chromedriver /usr/bin/chromedriver become: true - name: Install google-chrome shell: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb; apt install ./google-chrome-stable_current_amd64.deb become: true – Thi Hien Pham Feb 07 '23 at 14:13
  • I have added it in ansible script – Thi Hien Pham Feb 07 '23 at 14:13
  • Are you getting any error ? – Akzy Feb 07 '23 at 14:20
  • Yeah, it is always the same error – Thi Hien Pham Feb 07 '23 at 14:47
  • the webdriver-manager automatic download chromedriver ver-100 by default, have any change to config protractor to specific the version (109 ) of chromedriver which i want to install? Or a url for isntall google-chrome version 100? – Thi Hien Pham Feb 07 '23 at 14:50
0
- name: Install chromedriver
      shell: cd /tmp/; wget https://chromedriver.storage.googleapis.com/109.0.5414.74/chromedriver_linux64.zip; unzip chromedriver_linux64.zip; mv chromedriver /usr/bin/chromedriver
      become: true

    - name: Install google-chrome
      shell: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb; apt install ./google-chrome-stable_current_amd64.deb
      become: true