I am encountering an issue while trying to execute my Nightwatch script in Javascript. The error message I am receiving is:
\ Connecting to localhost on port 4445...
‼ Error connecting to localhost on port 4445.
× failed
Error: An error occurred while retrieving a new session: "session not created: This
version
of ChromeDriver only supports Chrome version 90"
× failed
Error: Nightwatch client is not ready.
Looks like function "createSession" did not succeed or was not called yet.
at Object.globals [as get] (C:\automation-Nightwatcg-12-27\QA Automation
\node_modules\nightwatch-api\lib\proxy.js:21:17)
at World.<anonymous> (C:\automation-Nightwatcg-12-27\QA
Automation\/cucumber.conf.js:72:17)
Extracted from nightwatch.js.conf
webdriver: {
start_process: !Boolean(process.env.NIGHTWATCH_SELENIUM_GRID),
port: process.env.NIGHTWATCH_SELENIUM_PORT || 4445,
},
I attempted to launch ChromeDriver with the following command:
Starting ChromeDriver 96.0.4664.45 (76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-refs/branch-
heads/4664@{#947}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on
keeping ChromeDriver safe.
ChromeDriver was started successfully.
Upon running ChromeDriver, it appears to be functioning on port 9515. Despite updating the nightwatch.js.conf file with this port configuration, the problem persists.
I have also tried several troubleshooting steps including:
Delete package-lock.json file and node_modules folder, then run npm cache clean followed by npm install: 1-npm cache clean --force 2-npm install
Based on my observation, it seems that there might be a port conflict causing this issue. If anyone has any insights on how to proceed, I would greatly appreciate your help. Thank you in advance.