-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Closed
Labels
stale?Issue that may be closed soon due to the original author not responding any more.Issue that may be closed soon due to the original author not responding any more.status: needs reproductionThis issue needs a simplified reproduction of the bug for further troubleshooting.This issue needs a simplified reproduction of the bug for further troubleshooting.type: bugAn issue or pull request relating to a bug in GatsbyAn issue or pull request relating to a bug in Gatsby
Description
Preliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
Description
--ca-file is used to set NODE_EXTRA_CA_CERTS at
gatsby/packages/gatsby/src/utils/get-ssl-cert.ts
Lines 65 to 67 in 934035d
| process.env.NODE_EXTRA_CA_CERTS = caFile | |
| ? absoluteOrDirectory(directory, caFile) | |
| : certPath |
But
NODE_EXTRA_CA_CERTSmust not be set at runtime: https://nodejs.org/api/cli.html#cli_node_extra_ca_certs_file (and it is loaded at startup since node 12, see nodejs/node#23354).
We don't know exactly why we had this regression (node upgrade, Gatsby 3 upgrade, ?) but socket.io URL (such as .../8001/socket.io/?EIO=4&transport=polling) was presenting wrong certificate, while regular server is Ok. Manually setting NODE_EXTRA_CA_CERTS fix the issue.
Reproduction Link
Steps to Reproduce
Set --ca-file option
Expected Result
No certificate error on socket.io/?EIO=4&transport=polling URLs
Actual Result
Certificate error on socket.io/?EIO=4&transport=polling URLs
Environment
System:
OS: macOS 11.6
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.22.6 - ~/.nodenv/versions/12.22.6/bin/node
Yarn: 1.22.11 - ~/.nodenv/versions/12.22.6/bin/yarn
npm: 6.14.15 - ~/.nodenv/versions/12.22.6/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 94.0.4606.71
Safari: 15.0
npmPackages:
gatsby: ^3.14.2 => 3.14.2
gatsby-image: ^3.11.0 => 3.11.0
gatsby-plugin-datadog: ^1.1.1 => 1.1.1
gatsby-plugin-material-ui: ^3.0.1 => 3.0.1
gatsby-plugin-offline: ^4.14.0 => 4.14.0
gatsby-plugin-react-helmet: ^4.14.0 => 4.14.0
gatsby-plugin-sharp: ^3.14.1 => 3.14.1
gatsby-plugin-styled-components: ^4.14.0 => 4.14.0
gatsby-plugin-svgr: ^3.0.0-beta.0 => 3.0.0-beta.0
gatsby-plugin-use-query-params: ^1.0.1 => 1.0.1
gatsby-source-filesystem: ^3.14.0 => 3.14.0
gatsby-transformer-sharp: ^3.14.0 => 3.14.0Config Flags
No response
Metadata
Metadata
Assignees
Labels
stale?Issue that may be closed soon due to the original author not responding any more.Issue that may be closed soon due to the original author not responding any more.status: needs reproductionThis issue needs a simplified reproduction of the bug for further troubleshooting.This issue needs a simplified reproduction of the bug for further troubleshooting.type: bugAn issue or pull request relating to a bug in GatsbyAn issue or pull request relating to a bug in Gatsby