Unable to use correct ChromeDriver version - google-chrome

I am conducting QA automation testing. The code was running and working fine last week, but on restarting my computer over the weekend, it has stopped working with this error message:
Request failed with status 500 due to session not created:
This version of ChromeDriver only supports Chrome version 103
I assume it auto-updated Chrome when I restarted the laptop, as it's gone from version 103 to 105, which means I need to update my ChromeDriver.
I've done this before a few months ago, can't totally remember the steps I followed but I got it working. I possibly did something wrong then, as I can't seem to update ChromeDriver from 103 to 105.
I've tried to remove my current instance and reinstall the newer version by running:
npm uninstall chromedriver -g
npm install -g chromedriver --detect_chromedriver_version --scripts-prepend-node-path
Also tried the same having downloaded it from here:
https://chromedriver.storage.googleapis.com/index.html?path=105.0.5195.52/
and doing
npm install -g chromedriver --chromedriver_filepath=<PATH>
Also tried removing chromedriver from my package.json, doing an npm install, then adding it back in and doing an npm install. Each of these methods say they have installed the correct chromeDriver version (105.0.5195.52)
My package.json currently shows:
"dependencies": {
"chromedriver": "^105.0.0",
},
and when I do chromeDriver -v I see:
ChromeDriver 105.0.5195.52
Any ideas? If additional information is required please let me know. I know I could probably get around this by downgrading my Chrome version to 103, but I'd prefer to avoid that if possible.

On further investigation, I think it's something to do with selenium. Running my tests on their own works, but if I do selenium-standalone start and then run them, it's failing as above.
I've updated selenium by running:
npm install selenium-standalone#latest -g
npm install
Following that, when I try to start it, it's giving me an error that chromedriver is missing within the selenium node_modules folder.
A bit more investigation and I've found I also needed to run
selenium-standalone install
This did some updating, and then I was able to run
selenium-standalone start
All good now :)

Related

How can I get chromedriver to work properly with chrome in wsl2?

I am trying to run automated tests on a repository forked from here. I haven't really worked with yarn or mocha before (or chromedriver) so I'm going off of what the instructions are saying.
I've set up Ubuntu 18.04 in wsl2 and installed google-chrome-stable and chromedriver both at version 99.0.4844.51 in /usr/bin/. I have yarn start running in one terminal and when I try actually run yarn test it gives me:
SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 99.0.4844.51 with binary path /usr/bin/google-chrome-stable
I've tried upgrading chromedriver from here to version 100.0.4896.20 but it gives me the same error saying it only supports Chrome version 94. I'm having a hard time trying to find Google version 94 for linux, and I'll be happy either way, either upgrading the chromedriver or downgrading chrome.

How to auto update chromedriver in webdriverIO

I have an automation framework developed using webdriverIO. The issue is all test cases start failing whenever chrome updated as chromedriver didn't update automatically.
This version of ChromeDriver only supports Chrome version 92
is there any way that ChromeDriver updated automatically whenever there is new available
Please note down latest version of Chrome (Help > About Google Chrome )
then check your package.json file where we have line like
"chromedriver": "^98.0.0",
update above line with latest chrome version like
"chromedriver": "^100.0.0",
then run command
npm install
Use the following commands this will auto-update all the JSON dependencies to the latest version
To update to the latest version
npx npm-check-updates -u
npm install and npm install chromedriver --save-dev

TestCafe Update "local" Chrome in Jenkins

I am running tests in Jenkins and the tests are running on outdated Chrome 71 and I want to update the chrome it is using. I've tried updating my package.json to current TestCafe but it is still running 71. when I run node_modules/.bin/testcafe --version it just lists firefox, chrome. It seems that since the chrome is in node_modules I should be able to update to latest but I haven't found anything online to show how to do so.
Running locally on my machine chrome is v91. I thought doing an 'npm i' locally and pushing that branch would update but it was not successful.
Jenkins output:
npm i
node_modules/.bin/testcafe --version
1.15.0
node_modules/.bin/testcafe -e chrome:headless auth-subscriber-signs-in-validates-homepage.js
Running tests in: Chrome 71.0.3578.98 / Linux 0.0
TestCafe doesn't upgrade or downgrade browsers. It just searches the installed browsers and runs tests in them. You need to inspect the Jenkins job and found the way how browsers are installed for it.

Unable to run headless chrome inside vagrant

I am trying to run unit tests in headless chrome(version 61).
I have mentioned the browsers as 'ChromeHeadless' in Karma.config and corresponding script has been added to package.json.
When I run the npm test command inside vagrant(using Ubuntu 64-bit), it gives me this error:
FATAL:nss_util.cc(632)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
I tried updating the NSS version by running the below command:
sudo apt-get install --reinstall libnss3 but still no luck.
Is there anything that I am missing or doing incorrectly?

404 error when using brew to install mysql - macOS Sierra

This question has been asked before here (404 error when using brew to install mysql), but unfortunately the fix doesn't work for me. I have already ran brew update, so I'm up to date.
I'm on the latest version of MacOS 10.12 and I am running Xcode 8 if that matters.
brew install mysql
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
==> Downloading https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.11.tar.gz
curl: (22) The requested URL returned error: 404 Not Found Error:
Failed to download resource "mysql" Download failed:
https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.11.tar.gz
I know it says this is a pre-release version, but is there any hope here?
Thanks
The 5.7.11 mysql download you reference no longer exists (it certainly is 404).
Looking at the homebrew formula for mysql, it has been updated to point to the latest mysql version.
So it seems that you are not in fact up to date. Try running brew update twice, then brew doctor and fix any warnings.
There have been some big changes in homebrew over the last 9 months, if you have an old install it might be easier to uninstall totally. There are also several ownership and directory location changes that need to be straightened out with the upgrade to homebrew 1.0
I followed the steps laid out here: Brew Update not working after mac 10.9
In case that's not visible anymore, here's that answer:
cd `brew --prefix`
git fetch origin
git reset --hard origin/master
After that, you should be able to brew update and then brew install mysql
For those who are still struggling to resolve this.
Please try:
brew update-reset
brew update
I found this gem here.
P.S.: If you have a shallow clone, after brew update-reset command, run the following command to unshallow:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow