Open TheDutchCoder opened 2 years ago
Hi @TheDutchCoder We have same problem actually - did you solve this already?
It's still showing up, but I'm not sure if there's a newer version, will check that later.
We also get an "app quit unexpectedly" warning whenever we close Cypress.
Same for me.
Cypress Version
Other
Running under VSCode.
Same for me too
Ubuntu (virtualBox) VS CODE
Same here.
Cypress 9.2.1 Mac M1 latest
It seems to have affected cypress testing only on first open after clean install for me.
From my limited experience it doesn't seem to affect Cypress testing.
I am using yarn pnp .. encounter this issue
Same thing as @zigang93. Using yarn PnP, all of a sudden I can't init cypress whatsoever. Trying to open the desktop app is unsuccessful, seeing the same error discussed above. When running my tests in headless mode, cypress starts, but it is like no packages have been installed at all, so everything fails.
I have the same error messages but everything still runs.
Same here. Log statements are showing up, but still the test suite runs fine.
I had the same warning
revert to cypress 9.2.0 seem to solve this,
npm install cypress@9.2.0
For me downgrading to cypress 9.2.0 did not remove the error. Tests are still passing with both 9.2.0 and 9.5.1 with the error.
9.5.1 reports this to me every time i run it. The first time, it crashed immediately upon printing this message, afterwards it runs fine.
I get the error only on M1 Mac but Intel Mac doesn't throw any errors. The same Node version (14.16.1), same code, same packages. Only difference is M1 and Intel chips. Is anyone having trouble on Intel Mac?
@dong82 I'm seeing it on Intel Mac with node 12 (so old, I know).
M1 issue was addressed by Cypress themselves. See their article here.
The error doesn't seem to affect the test run. But to get rid of it anyway, for me it helped just to unset the environment variable before running cypress.
unset NODE_OPTIONS
FWIW, I'm using cypress 8.6.0 on an Intel Mac.
The error doesn't seem to affect the test run. But to get rid of it anyway, for me it helped just to unset the environment variable before running cypress.
unset NODE_OPTIONS
FWIW, I'm using cypress 8.6.0 on an Intel Mac.
This worked for me.
FYI NODE_OPTIONS
is set by Yarn to add the PnP module loader to Node when you use yarn exec
, so if you're using Yarn PnP you probably shouldn't unset it. Even if you're not using PnP it's probably worth checking what value it's set to 🤷🏻
I solved this problem But the point is that I use Angular version 14
I run the commandng e2e
to solve this problem
Then I selected cypress among the suggested options in the command line
I am also running into this, I think NODE_OPTIONS is not getting respected (which yarn uses to set the --require
for their PnP feature) which is why https://github.com/cypress-io/cypress/issues/25960 is a problem.
I am trying to find out how to fix this. The warning is from Electron: https://www.electronjs.org/docs/latest/api/environment-variables#node_options. Specifically
NODE_OPTIONS are explicitly disallowed in packaged apps, except for the following:
--max-http-header-size
--http-parser
Hmm, wonder if we can make this work somehow.
i have this same problem used docker and vite
This issue also affects Cypress E2E tests using Yarn Modern pnp. It is not restricted to CT.
Is this causing anyone to be unable to run tests or is mostly a style thing (eg - you don't like seeing a warning, even if it has no impact on you runs)?
@lmiller1990
Is this causing anyone to be unable to run tests or is mostly a style thing (eg - you don't like seeing a warning, even if it has no impact on you runs)?
I haven't seen any test impact. The Electron warning always appears with Yarn Plug'n'Play, presumably because Electron is always used in the first phase, even if subsequently another browser is used for tests.
Hello
I have similar issue with running nodemon as debug configuration for VS code on Windows10 for Node.js by using .vscode/launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "nodemon",
"runtimeExecutable": "${workspaceFolder}/node_modules/nodemon/bin/nodemon.js",
"restart": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}
In my case:
"runtimeExecutable": "${workspaceFolder}/node_modules/nodemon/bin/nodemon.js"
, to "runtimeExecutable": "nodemon"
,Command line changed from: :${env:NODE_OPTIONS}='--require "c:/Users/38098/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/ms-vscode.js-debug/src/bootloader.js" --inspect-publish-uid=http'; ${env:VSCODE_INSPECTOR_OPTIONS}='{"inspectorIpc":"\\.\pipe\node-cdp.18452-04647856-1.sock","deferredMode":false,"waitForDebugger":"","execPath":"C:\Program Files\nodejs\node.exe","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"C:\Users\38098\AppData\Local\Temp\node-debug-callback-5477a4347fa4ae67"}'; & 'D:\projects\4-nodejs-demo-3/node_modules/nodemon/bin/nodemon.js'
to: ${env:NODE_OPTIONS}='--require "c:/Users/38098/AppData/Local/Programs/Microsoft VS Code/resources/app/extensions/ms-vscode.js-debug/src/bootloader.js" --inspect-publish-uid=http'; ${env:VSCODE_INSPECTOR_OPTIONS}='{"inspectorIpc":"\\.\pipe\node-cdp.7668-3e75cba0-11.sock","deferredMode":false,"waitForDebugger":"","execPath":"C:\Program Files\nodejs\node.exe","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"C:\Users\38098\AppData\Local\Temp\node-debug-callback-03f1f420e5a7512e"}'; & 'C:\Users\38098\AppData\Roaming\npm\nodemon.cmd'
And it starts to work.
For my case, I was using "cypress": "^12.17.2",
yarn install
yarn install
Nothing has changed on my yarn.lock
, but that workaround did resolve my issue. Very strange !!!
Adding my voice to the group. Experiencing this with latest version of Cypress (^13.0.0).
Our setup is using NX to create an single Angular application. We then set up Yarn PnP, and then ran the cypress command to configure component tests (yarn nx g @nx/angular:cypress-component-configuration --project=my-project --build-target=my-projectr:build
).
We then get this
[50088:0921/113920.188:ERROR:node_bindings.cc(300)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
Followed by this
DevTools listening on ws://127.0.0.1:53068/devtools/browser/60158d19-8ee0-4092-bc24-6df5ffca7643
Your configFile is invalid: C:\Projects\***\cypress.config.ts
It threw an error when required, check the stack trace below:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for C:\Projects\***\cypress.config.ts
at new NodeError (node:internal/errors:405:5)
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:99:9)
at defaultGetFormat (node:internal/modules/esm/get_format:142:36)
at defaultLoad (node:internal/modules/esm/load:91:20)
at nextLoad (node:internal/modules/esm/hooks:733:28)
at load$1 (file:///C:/***/.pnp.loader.mjs:1456:12)
at nextLoad (node:internal/modules/esm/hooks:733:28)
at Hooks.load (node:internal/modules/esm/hooks:377:26)
at MessagePort.handleMessage (node:internal/modules/esm/worker:168:24)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:778:20)
@AStoker
Still happening with the latest version.
I also see this on latest
I also see this on latest
+1
+1
+1
Current behavior
When I run
npm run cypress:open-ct
(orrun-ct
), I get an error[43901:1203/085557.424470:ERROR:node_bindings.cc(276)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
This might be an Electron issue and it doesn't seem to affect behaviour for us.
Desired behavior
No error to be thrown
Test code to reproduce
Run the Cypress component tester
Cypress Version
9.1.0
Other
MacOS 11.6 Node v16.0.0