question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress 9.0.0 + Node 17.1 (Win 11) Crashes

See original GitHub issue

Current behavior

Setup:

  • Windows 11
  • Node/NPM installed via Windows Binary Zip (64bit) into a predefined folder, included in the PATH so npm, etc, can be called from anywhere
  • Cypress installed as completely vanilla (i.e. npx cypress cache clear && npx cypress install && npx cypress open) - no other config or setup changes at all

When I use Cypress 9.0.0 and Node 17.1 (i.e. latest versions), Cypress opens up and displays the sample tests, but clicking any one of them results in the following error (non-important folder names redacted for privacy):

Title: Error running plugin

Message: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file ([appDir]\cypress\plugins\index.js)

Stack trace:

Error: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (`[appDir]\cypress\plugins\index.js`)
    at Object.get (C:\Users\[user]\AppData\Local\Cypress\Cache\9.0.0\Cypress\resources\app\packages\server\lib\errors.js:1043:15)
    at EventEmitter.handleError (C:\Users\[user]\AppData\Local\Cypress\Cache\9.0.0\Cypress\resources\app\packages\server\lib\plugins\index.js:189:20)
    at EventEmitter.emit (node:events:394:28)
    at ChildProcess.<anonymous> (C:\Users\[user]\AppData\Local\Cypress\Cache\9.0.0\Cypress\resources\app\packages\server\lib\plugins\util.js:19:22)
    at ChildProcess.emit (node:events:394:28)
    at emit (node:internal/child_process:920:12)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)

If I downgrade either/both to Cypress 8.7, or Node 16.13 (LTS version), then everything works fine and as expected, i.e.

  • Cypress 8.7 + Node 17.1 works
  • Cypress 9.0 + Node 16.13 works
  • Cypress 8.7 + Node 16.13 works

Desired behavior

Cypress 9.0 should run as expected with Node 17.1

Test code to reproduce

No test code required, it’ll fail running the examples

Cypress Version

9.0.0

Other

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
BlueWindscommented, Nov 24, 2021

I am facing with the same error with Cypress 9.1.0. which file should I add “nodeVersion”: “bundled” ? I don’t know as long as cypress.json or package.json Thanks!!

In cypress.json.

2reactions
BlueWindscommented, Nov 23, 2021

Ok, so looking into the issue with cypress + node 17, it appears the following:

  • Node17 updated to OpenSSL 3.0, which now throws errors when you try to use obsolete hashing functions.
  • Webpack <5.61 rely on the builtin node cypto module for md4 hashes. They’ve fixed it in 5.61, but have no intention of backporting to webpack 4.
  • Cypress currently uses Webpack 4.44.2, and updating is a fairly major project. We’ll have to do it eventually, but it’s not an immediate solution.

Adding NODE_OPTIONS=--openssl-legacy-provider when we spawn the plugins process fixes this under node 17, but it also breaks node 16 - which means I need to query the node version before launching the plugin process and only add it for node 17+. Not terrible, just still working through it.

Anyway, these are just today’s research notes. The workarounds remain the same - set "nodeVersion": "bundled", launch node with NODE_OPTIONS=--openssl-legacy-provider, or use node 16.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix Cypress Crashing Issue In Windows - YouTube
In this video, we will discuss how to fix the cypress crashing issue.New Selenium Batch Starting ...
Read more >
package.json - rouch/Cypress - NotABug.org
Cypress - Fast, easy and reliable testing for anything that runs in a browser.
Read more >
Debian -- Software Packages in "bullseye"
... aeskeyfind (1:1.0-11): tool for locating AES keys in a captured memory image ... asciidoc-fop (9.0.0~rc2-1): Asciidoc package including fop dependencies ...
Read more >
Upgrade Cypress to latest version not working without force ...
cypress cache clear npm install cypress --save-dev ... npx executes binaries from npm packages and it won't install. Refer the diff.
Read more >
Search Results - CVE
In affected versions a command injection vulnerability allows an unauthenticated user to execute arbitrary code on a server running Cacti, if a specific...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found