Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--ca-file options seems to be broken with Node >= 12 #33492

Closed
2 tasks done
vhiairrassary opened this issue Oct 11, 2021 · 3 comments
Closed
2 tasks done

--ca-file options seems to be broken with Node >= 12 #33492

vhiairrassary opened this issue Oct 11, 2021 · 3 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@vhiairrassary
Copy link
Contributor

Preliminary Checks

Description

--ca-file is used to set NODE_EXTRA_CA_CERTS at

process.env.NODE_EXTRA_CA_CERTS = caFile
? absoluteOrDirectory(directory, caFile)
: certPath

But NODE_EXTRA_CA_CERTS
must 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.0

Config Flags

No response

@vhiairrassary vhiairrassary added the type: bug An issue or pull request relating to a bug in Gatsby label Oct 11, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 11, 2021
@vhiairrassary vhiairrassary changed the title --ca-file seems to be broken --ca-file options seems to be broken with Node >= 12 Oct 11, 2021
@LekoArts LekoArts added status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Oct 12, 2021
@LekoArts
Copy link
Contributor

Hi!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Gatsby! 💜

@github-actions
Copy link

github-actions bot commented Nov 1, 2021

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Nov 1, 2021
@LekoArts
Copy link
Contributor

LekoArts commented Nov 8, 2021

Hi!

Since we didn't receive an answer for 7 days or more about the ask of a reproduction I'm going to close this now, as we can't do much to help without a reproduction. If you are able to create a minimal reproduction for this then please do answer here or open a new issue with a reproduction. Thanks!

@LekoArts LekoArts closed this as completed Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

2 participants