webdriverio: [🐛 Bug]: Worker starts with downloading the chromedriver from incorrect path what leads to a failure
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
8.14.4
Node.js Version
18.17.0
Mode
WDIO Testrunner
Which capabilities are you using?
"@wdio/cli": "^8.14.4",
"@wdio/cucumber-framework": "^8.14.0",
"@wdio/local-runner": "^8.14.3",
"@wdio/spec-reporter": "^8.14.0"
What happened?
I setup the project from the scratch today (3 August 2023) with JS, Cucumber, local-runner and spec-reporter. After the successful message in the console, I run “npm run wdio” and this job failed due to an error (please find repository here https://github.com/HannaTarasevich/wdio-cucumber-bug):
According to my investigation, there is incorrect link to Chromedriver download. I’m using Chrome locally, current version is 115.0.5790.171, but WDIO tries downloading the same version of Chromedriver, but actually there is no such version (Chrome for Testing also does not have this version, only desktop has):
What is your expected behavior?
WDIO should take correct version from https://googlechromelabs.github.io/chrome-for-testing/ and https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints, not using Chrome desktop versions
How to reproduce the bug.
- Please clone repo https://github.com/HannaTarasevich/wdio-cucumber-bug
- Run npm/yarn install
- Run “npm run wdio”
Relevant log output
"C:\Program Files\nodejs\npm.cmd" run wdio
> wdio
> wdio run ./wdio.conf.js
Execution of 1 workers started at 2023-08-03T19:29:27.307Z
2023-08-03T19:29:27.335Z INFO @wdio/cli:launcher: Run onPrepare hook
2023-08-03T19:29:27.340Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2023-08-03T19:29:27.342Z INFO @wdio/local-runner: Start worker 0-0 with arg: run,./wdio.conf.js
[0-0] 2023-08-03T19:29:29.671Z INFO @wdio/local-runner: Run worker command: run
[0-0] (node:19188) DeprecationWarning: `PickleFilter` is deprecated, use `loadSources` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md
[0-0] (Use `node --trace-deprecation ...` to show where the warning was created)
[0-0] (node:19188) DeprecationWarning: `parseGherkinMessageStream` is deprecated, use `loadSources` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations
.md
[0-0] RUNNING in chrome - file:///C:/123/features/login.feature
[0-0] 2023-08-03T19:29:30.443Z INFO webdriver: Initiate new session using the WebDriver protocol
[0-0] 2023-08-03T19:29:30.455Z INFO webdriver: Downloading Chromedriver v115.0.5790.171
[0-0] 2023-08-03T19:29:31.161Z ERROR @wdio/runner: Error: Download failed: server returned code 404. URL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.171
/win64/chromedriver-win64.zip
[0-0] at file:///C:/123/node_modules/@puppeteer/browsers/lib/esm/httpUtil.js:74:31
[0-0] at ClientRequest.requestCallback (file:///C:/123/node_modules/@puppeteer/browsers/lib/esm/httpUtil.js:52:13)
[0-0] at Object.onceWrapper (node:events:629:26)
[0-0] at ClientRequest.emit (node:events:514:28)
[0-0] at ClientRequest.emit (node:domain:489:12)
[0-0] at HTTPParser.parserOnIncomingClient (node:_http_client:700:27)
[0-0] at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
[0-0] at TLSSocket.socketOnData (node:_http_client:541:22)
[0-0] at TLSSocket.emit (node:events:514:28)
[0-0] at TLSSocket.emit (node:domain:489:12)
[0-0] at addChunk (node:internal/streams/readable:324:12)
[0-0] at readableAddChunk (node:internal/streams/readable:297:9)
[0-0] at Readable.push (node:internal/streams/readable:234:10)
[0-0] at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)
[0-0] FAILED in chrome - file:///C:/123/features/login.feature
2023-08-03T19:29:31.415Z INFO @wdio/cli:launcher: Run onWorkerEnd hook
2023-08-03T19:29:31.416Z INFO @wdio/cli:launcher: Run onComplete hook
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:04
2023-08-03T19:29:31.419Z INFO @wdio/local-runner: Shutting down spawned worker
2023-08-03T19:29:31.676Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2023-08-03T19:29:31.677Z INFO @wdio/local-runner: shutting down
Process finished with exit code 1
Code of Conduct
- I agree to follow this project’s Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 19 (10 by maintainers)
Hey @christian-bromann,
Unfortunately, this didn’t work for us. Instead we were met with the following error:
Hey @HannaTarasevich , thanks for raising the issue.
If no
browserNameis defined, WebdriverIO will check for a local installed Chrome browser and will try to install a Chromedriver that matches it. I wonder if there are Chrome versions that aren’t compiled with a Chromedriver. You can resolve the issue by addingbrowserName: 'stable'to your capabilities.I think WebdriverIO should attempt to just download the latest Chromedriver for v115 in this case.
We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers!