Puppeteer Does Not Pass CA File Configs when Downloading Chromium
See original GitHub issueI am attempting to download Chromium as part of the puppeteer install process with PUPPETEER_DOWNLOAD_HOST set to my organization’s Artifactory server. The server has a self-signed certificate. After setting NODE_EXTRA_CA_CERTS to a valid PEM file I was able to install pupeteer, but Chromium failed. So, I consulted the following articles:
https://github.com/puppeteer/puppeteer/issues/1994
After following all the suggestions in the issue threads above, I continue to see the issue of Chromium failing to download because of the self-signed certificate.
Perhaps the CA file configurations are not respected when attempting to download Chromium.
Steps to reproduce
Tell us about your environment:
- Puppeteer version: 2.0.0
- Platform / OS version: Win 10 Version 1809 (OS Build 17763.973)
- URLs (if applicable):
- Node.js version: v12.14.1
What steps will reproduce the problem?
Please include code that reproduces the issue.
- Set PUPPETEER_DOWNLOAD_HOST
- Set NODE_EXTRA_CA_CERTS and/or CAFILE to a valid CER or PEM file
- Run NPM install
What is the expected result?
Installation of Puppeteer and appropriate Chromium revision for Puppeteer version.
What happens instead?
The following error:
puppeteer@2.0.0 install [Path to project folder]\node_modules\puppeteer node install.js
ERROR: Failed to download Chromium r706915! Set “PUPPETEER_SKIP_CHROMIUM_DOWNLOAD” env variable to skip download. Error: self signed certificate in certificate chain at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34) at TLSSocket.emit (events.js:223:5) at TLSSocket._finishInit (_tls_wrap.js:794:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12) – ASYNC – at BrowserFetcher.<anonymous> ([Path to project folder]\node_modules\puppeteer\lib\helper.js:111:15) at Object.<anonymous> ([Path to project folder]\node_modules\puppeteer\install.js:62:16) at Module._compile (internal/modules/cjs/loader.js:955:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:991:10) at Module.load (internal/modules/cjs/loader.js:811:32) at Function.Module._load (internal/modules/cjs/loader.js:723:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10) at internal/main/run_main_module.js:17:11 { code: ‘SELF_SIGNED_CERT_IN_CHAIN’ } npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@2.0.0 install: node install.js
npm ERR! Exit status 1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:6
Top GitHub Comments
I do see that in https://github.com/puppeteer/puppeteer/issues/1994#issuecomment-367153013 and https://stackoverflow.com/questions/9626990/receiving-error-error-ssl-error-self-signed-cert-in-chain-while-using-npm/35510347#35510347 it says that we have to add the below to /etc/environment:
I think the key here is to set it in the
/etc/environment
file, which I never tried before. We will try this tomorrow and report back.We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!