microsoft / vscode-test-cli

Command-line runner for VS Code tests
MIT License
19 stars 7 forks source link

Unable to run vscode-test because of SSL certificates #7

Closed nfogh closed 5 months ago

nfogh commented 9 months ago

When trying to run vscode-test, I get the following error:

> vscode-test

Error: unable to get local issuer certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1535:34)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket._finishInit (node:_tls_wrap:949:8)
    at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:730:12)

I am behind a corporate firewall on windows, so I expect it has something to do with either proxy settings or the certificate chain that is not being used properly.

jacobwi commented 5 months ago

Can you provide the stacktrace?

nfogh commented 5 months ago

I get this output from the latest version 0.0.8. My extension depends on some other extensions:

Found existing install in C:\source\.vscode-test\vscode-win32-x64-archive-insiders. Skipping download
Error: Failed to install extensions (ms-vscode.cpptools, nikolajfogh.qconn-extension): Installing extensions...
Error while installing extensions: unable to get local issuer certificate
unable to get local issuer certificate

    at ChildProcess.<anonymous> (file:///C:/source/node_modules/@vscode/test-cli/out/cli/platform/desktop.mjs:134:28)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:337:12)

I am behind a firewall, but I have set NODE_EXTRA_CA_CERTS correctly.

connor4312 commented 5 months ago

VS Code does not look at NODE_EXTRA_CA_CERTS. You can try setting http.experimental.systemCertificatesV2 in your test instance of VS Code first. This is out of scope of the test CLI.