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

fix: Add support for system node 17 #19094

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

BlueWinds
Copy link
Contributor

User facing changelog

When using the default configuratation of "nodeVersion": "system" with an installed system node >=17, cypress will now work properly rather than throw an error incorrectly pointing to the user's plugin file.

Additional details

Previously, users could work around this by setting NODE_OPTIONS=--openssl-legacy-provider. We now apply this workaround by default when detecting system node version 17.

How has the user experience changed?

image

This error no longer occurs when attempting to run spec files. It incorrectly points to the user's plugin file as the cause, while this was actually a bug with Cypress' bundled webpack.

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation? N/A
  • Have API changes been updated in the type definitions? N/A
  • Have new configuration options been added to the cypress.schema.json? N/A

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 24, 2021

Thanks for taking the time to open a PR!

@BlueWinds BlueWinds changed the title Add support for system node 17 fix: Add support for system node 17 Nov 24, 2021
@cypress
Copy link

cypress bot commented Nov 24, 2021



Test summary

576 0 0 0Flakiness 0


Run details

Project cypress
Status Passed
Commit 1fdf7ae
Started Nov 24, 2021 7:12 PM
Ended Nov 24, 2021 7:20 PM
Duration 08:30 💡
OS Linux Debian - 10.10
Browser Electron 94

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@BlueWinds BlueWinds marked this pull request as ready for review December 1, 2021 18:04
@BlueWinds BlueWinds requested a review from a team as a code owner December 1, 2021 18:04
@BlueWinds BlueWinds requested review from jennifer-shehane, mjhenkes, a team and emilyrohrbough and removed request for a team and jennifer-shehane December 1, 2021 18:04
// To be removed on update to webpack >= 5.61, which no longer relies on
// node's builtin crypto.hash function.
if (semver.satisfies(config.resolvedNodeVersion, '>=17.0.0')) {
childOptions.env.NODE_OPTIONS += ' --openssl-legacy-provider'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible for users to bring their own version of webpack?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, could we check to see if they're using our version or theirs before adding the option?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually i'm not sure that really matters, this is probably fine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that while they can bring their own webpack config, but not version. And if I'm wrong and they can, it should still be harmless to add the arg.

@BlueWinds BlueWinds merged commit 6b19381 into develop Dec 2, 2021
@BlueWinds BlueWinds deleted the issue-18914-system-node-17-support-90 branch December 2, 2021 17:37
@aeneasr
Copy link

aeneasr commented Dec 8, 2021

For me, Cypress 9.1.1 fails on macOS Monterey on a M1 with:

> cypress open --browser chrome "--config" "integrationFolder=cypress/integration"

/opt/homebrew/Cellar/node/17.2.0/bin/node: --openssl-legacy-provider is not allowed in NODE_OPTIONS

Is this a regression of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress 9.0.0 + Node 17.1 (Win 11) Crashes
4 participants