webdriverio/webdriverio

[🐛 Bug]: Error: self-signed certificate in certificate chain

Open

#13,946 建立於 2024年12月4日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)JavaScript (6,029 star) (1,793 fork)batch import
Bug 🐛help wanted

描述

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

v20.15.1

Mode

WDIO Testrunner

Which capabilities are you using?

capabilities: [{
        browserName: 'chrome',
        'goog:chromeOptions': {
            args: ['--ignore-certificate-errors'],
        },
    }],

What happened?

When I run the npm run wdio command to run the test, it ends showing the following issue:

Error: Error: self-signed certificate in certificate chain

What is your expected behavior?

I was expecting the chrome stable version was downloaded

How to reproduce the bug.

Set up new project using wdio 9 and node v20.15.1 with cucumber then run the command 'npm run wdio'

Relevant log output

Execution of 0 workers started at 2024-12-04T03:29:32.754Z

2024-12-04T03:29:32.813Z INFO @wdio/cli:launcher: Run onPrepare hook
2024-12-04T03:29:32.814Z INFO @wdio/utils: Setting up browser driver for: chrome@stable
2024-12-04T03:29:32.814Z INFO @wdio/utils: Setting up browser binaries for: chrome@stable
2024-12-04T03:29:32.873Z INFO webdriver: Downloading Chromedriver v131.0.6778.86
2024-12-04T03:29:33.205Z WARN webdriver: Chromedriver v131.0.6778.86 don't exist, trying to find known good version...
2024-12-04T03:29:33.400Z INFO @wdio/local-runner: Shutting down spawned worker
2024-12-04T03:29:33.653Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2024-12-04T03:29:33.653Z INFO @wdio/local-runner: shutting down
Error: Error: self-signed certificate in certificate chain
    at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
    at TLSSocket.emit (node:events:519:28)
    at TLSSocket.emit (node:domain:488:12)
    at TLSSocket._finishInit (node:_tls_wrap:1085:8)
    at ssl.onhandshakedone (node:_tls_wrap:871:12)
Error: self-signed certificate in certificate chain
    at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
    at TLSSocket.emit (node:events:519:28)
    at TLSSocket.emit (node:domain:488:12)
    at TLSSocket._finishInit (node:_tls_wrap:1085:8)
    at ssl.onhandshakedone (node:_tls_wrap:871:12) {
  code: 'SELF_SIGNED_CERT_IN_CHAIN'
}

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

貢獻者指南