[Bug]When working with a proxy, the extensions cannot be automatically installed.
I am using a proxy and installed the proxy root cert into the host system (MacOs 13.0.1 on m1), also in the container (with "postCreateCommand": "update-ca-certificates"). but when the container is created, the vscode extensions cannot be installed automatically.
In the Server output, it shows the error:
[error] Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:526:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)
If you manually install those extensions, you can succeed, but the same error still happens:
2023-04-14 13:18:51.782 [info] Getting Manifest... firsttris.vscode-jest-runner
2023-04-14 13:18:53.268 [error] Failed to install extension. firsttris.vscode-jest-runner
2023-04-14 13:18:53.269 [error] Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:526:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)
2023-04-14 13:18:56.103 [info] Downloaded extension to file:///home/node/.vscode-server/extensionsCache/c43f6b2a-2384-48bd-ae85-353b75a340bf
2023-04-14 13:18:56.114 [info] Installing extension: firsttris.vscode-jest-runner
2023-04-14 13:18:56.114 [info] Installing the extension without checking dependencies and pack firsttris.vscode-jest-runner
2023-04-14 13:18:56.136 [info] Removed the extension from uninstalled list: firsttris.vscode-jest-runner
2023-04-14 13:18:56.157 [info] Deleted from disk firsttris.vscode-jest-runner /home/node/.vscode-server/extensions/firsttris.vscode-jest-runner-0.4.60
2023-04-14 13:18:56.266 [info] Extracted extension to /home/node/.vscode-server/extensions/.8e55fd86-d39c-45f5-aa94-2892122214d7: firsttris.vscode-jest-runner
2023-04-14 13:18:56.271 [info] Renamed to /home/node/.vscode-server/extensions/firsttris.vscode-jest-runner-0.4.60
2023-04-14 13:18:56.272 [info] Extracting extension completed. firsttris.vscode-jest-runner
2023-04-14 13:18:56.278 [info] Extension installed successfully: firsttris.vscode-jest-runner
I also tried to set the container environment NODE_EXTRA_CA_CERTS to point to the proxy root cert, but it doesn't help too.
It worked fine until I update docker to 4.17.0, from this version, docker seems to change the proxy policy a little bit, so the host proxy settings are making effect by default.
Hi 👋
Thanks for reporting the issue. @alexander-smolyakov can you help investigate? thanks!
Hi guys, is there any update? It's over one year now, and in the past year, we need to manually install extensions every time after we purged the volumes.
I was finally able to get it working. It kept erroring out with this error:
Container server: Warning: Ignoring extra certs from .devcontainer/certs/someSpecialCert.pem, load failed: error:80000002:system library::No such file or directory
Once the containerEnv section was added to the devcontainer.json file, with correct path as in the following section, it started working. The localWorkspaceFolderBasename variable is a variable that is set automatically with the devcontainer.
"containerEnv": {
"NODE_EXTRA_CA_CERTS": "/workspaces/${localWorkspaceFolderBasename}/.devcontainer/certs/someSpecialCert.pem"
}
Apparently it's not happy with a relative path.
Ramezan