0

I'm using Selenium for Java in version 3.141.59 and the code is unable to start a chromium instance but throws an exception:

nested exception is org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 81

The code is running on Ubuntu 18.04 with OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~18.04-b09) and the chromium and chromedriver versions should fit:

chromium-browser --version

Chromium 81.0.4044.138 Built on Ubuntu , running on Ubuntu 18.04

chromedriver --version

ChromeDriver 81.0.4044.138 (8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999})

Both are in $PATH for the user running this code:

which chromedriver

/usr/bin/chromedriver

which chromium-browser

/usr/bin/chromium-browser

I also tried the Selenium version 4.0.0-alpha-5 but this didn't change the behaviour. I also tried System.setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver"), which didn't help either.

Any help is appreciated.

2 Answers2

0

I found the problem: as this only happens when there are version conflicts, I looked up if there are any different versions installed:

dpkg -l |grep chrome
ii  chromium-chromedriver                 81.0.4044.138-0ubuntu0.18.04.1      amd64        WebDriver driver for the Chromium Browser
ii  google-chrome-stable                  83.0.4103.61-1                      amd64        The web browser from Google

A simple

dpkg --purge google-chrome-stable

solved the problem.

0

Can you try putting chromedriver in /usr/local/bin? then run "sudo chmod +x chromedriver"