Closed ghost closed 8 months ago
Can confirm, also having this on both macOs, and linux (and CI). Also on node 20.10
Our pipeline step for cypress tests failed after upgrading to v13.6.5, so I had to revert the upgrade. My DevOps guy thought it was a memory leak somewhere.
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Related to this, or a separate issue?
@johansunden Can you open a seperate issue please?
@danr-za Could you run Cypress in debug mode mode and print the entire set of logs here?
cypress cache clear
to see if this resolves the issue?The Cache path in the first example looks not right to me. There's an extra Cypress
at the end there.
/home/runner/.cache/Cypress/13.6.5/Cypress/Cypress --no-sandbox --smoke-test --ping=846
This is a successful cache path:
cypress open
It looks like this is your first time using Cypress: 13.6.5
✔ Verified Cypress! /Users/jennifer/Library/Caches/Cypress/13.6.5/Cypress.app
Here are the debug logs. I can confirm that:
cypress cache clear
-> cypress install
-> cypress open
worksHas something changed in this manner in 13.6.5? We never had this issue in version upgrades. (especially in patch)
cypress:cli exporting Cypress module interface +0ms
cypress:cli verifying Cypress app +0ms
cypress:cli checking environment variables +0ms
cypress:cli checking if executable exists /Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress +2ms
cypress:cli Binary is executable? : true +0ms
cypress:cli binaryDir is /Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app +1ms
cypress:cli Reading binary package.json from: /Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/Resources/app/package.json +0ms
cypress:cli Found binary version 13.6.5 installed in: /Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app +3ms
cypress:cli could not read binary_state.json file at "/Users/dan/Library/Caches/Cypress/13.6.5/binary_state.json" +4ms
cypress:cli {} +0ms
cypress:cli is Verified ? undefined +1ms
cypress:cli running binary verification check 13.6.5 +0ms
It looks like this is your first time using Cypress: 13.6.5
cypress:cli clearing out the verified version +3ms
cypress:cli needs Xvfb? false +0ms
cypress:cli spawning, should retry on display problem? false +0ms
cypress:cli disabling Electron sandbox +0ms
cypress:cli running smoke test +0ms
cypress:cli using Cypress executable /Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress +0ms
cypress:cli smoke test command: /Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=346 +0ms
cypress:cli smoke test timeout 30000 ms +0ms
cypress:cli smoke test stdout "It looks like you are running the Cypress binary directly.
This is not the recommended approach, and Cypress may not work correctly.
Please install the cypress NPM package and follow the instructions here:
https://on.cypress.io/installing-cypress
346" +783ms
cypress:cli Smoke test failed because could not find 346 in: {
command: '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=346',
exitCode: 0,
stdout: '\x1B[35mIt looks like you are running the Cypress binary directly.\x1B[39m\n' +
'\x1B[35m\x1B[39m\n' +
'\x1B[35mThis is not the recommended approach, and Cypress may not work correctly.\x1B[39m\n' +
'\x1B[35m\x1B[39m\n' +
'\x1B[35mPlease install the \x1B[33mcypress\x1B[35m NPM package and follow the instructions here:\x1B[39m\n' +
'\x1B[35m\x1B[39m\n' +
'\x1B[35mhttps://on.cypress.io/installing-cypress\x1B[39m\n' +
'\x1B[33m346\x1B[39m',
stderr: '2024-02-21T15:03:01.410Z cypress:snapshot:info Caching 3471, defining 4299 modules! Using cache\n' +
'2024-02-21T15:03:01.413Z cypress:snapshot:debug initializing packherd require\n' +
'2024-02-21T15:03:01.521Z cypress:server:performance-benchmark elapsed time at v8-snapshot-startup-time: 114.532ms\n' +
'2024-02-21T15:03:01.562Z cypress:server:appdata path: /Users/dan/Library/Application Support/Cypress/cy/production/browsers\n' +
"2024-02-21T15:03:01.567Z cypress:server:cypress starting cypress with argv [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress', '--no-sandbox', '--smoke-test', '--ping=346' ]\n" +
"2024-02-21T15:03:01.567Z cypress:server:args argv array: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress', '--no-sandbox', '--smoke-test', '--ping=346' ]\n" +
"2024-02-21T15:03:01.568Z cypress:server:args parsed argv options { options: { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, 'smoke-test': true, smokeTest: true, ping: 346 } }\n" +
"2024-02-21T15:03:01.570Z cypress:server:args argv parsed: { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, smokeTest: true, ping: 346, invokedFromCli: false, cwd: '/Users/dan/work/apps' }\n" +
'2024-02-21T15:03:01.571Z cypress:server:util:proxy found proxy environment variables {}\n' +
"2024-02-21T15:03:01.572Z cypress:server:args options { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, smokeTest: true, ping: 346, invokedFromCli: false, cwd: '/Users/dan/work/apps', config: {} }\n" +
"2024-02-21T15:03:01.572Z cypress:server:args argv options: { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, smokeTest: true, ping: 346, invokedFromCli: false, cwd: '/Users/dan/work/apps', config: {}, pong: 346 }\n" +
"2024-02-21T15:03:01.572Z cypress:server:cypress from argv [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress', '--no-sandbox', '--smoke-test', '--ping=346' ] got options { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, smokeTest: true, ping: 346, invokedFromCli: false, cwd: '/Users/dan/work/apps', config: {}, pong: 346 }\n" +
'2024-02-21T15:03:01.600Z cypress:server:appdata path: /Users/dan/Library/Application Support/Cypress/cy/production\n' +
'\n' +
'DevTools listening on ws://127.0.0.1:57259/devtools/browser/df32d1d2-7b95-48e7-8771-ec4a9048ffc4\n' +
'2024-02-21 17:03:01.630 Cypress[10864:1570941] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.\n' +
"2024-02-21T15:03:01.661Z cypress:server:cypress starting in mode smokeTest with options { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, smokeTest: true, ping: 346, invokedFromCli: false, cwd: '/Users/dan/work/apps', config: {}, pong: 346 }\n" +
'2024-02-21T15:03:01.664Z cypress:server:cypress running Electron currently\n' +
'2024-02-21T15:03:01.668Z cypress:server:cypress about to exit with code 0\n' +
'2024-02-21T15:03:01.668Z cypress:server:browsers browsers.kill called with no active instance',
all: undefined,
failed: false,
timedOut: false,
isCanceled: false,
killed: false
} +0ms
Cypress verification failed.
This command failed with the following output:
/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=346
----------
2024-02-21T15:03:01.410Z cypress:snapshot:info Caching 3471, defining 4299 modules! Using cache
2024-02-21T15:03:01.413Z cypress:snapshot:debug initializing packherd require
2024-02-21T15:03:01.521Z cypress:server:performance-benchmark elapsed time at v8-snapshot-startup-time: 114.532ms
2024-02-21T15:03:01.562Z cypress:server:appdata path: /Users/dan/Library/Application Support/Cypress/cy/production/browsers
2024-02-21T15:03:01.567Z cypress:server:cypress starting cypress with argv [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress', '--no-sandbox', '--smoke-test', '--ping=346' ]
2024-02-21T15:03:01.567Z cypress:server:args argv array: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress', '--no-sandbox', '--smoke-test', '--ping=346' ]
2024-02-21T15:03:01.568Z cypress:server:args parsed argv options { options: { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, 'smoke-test': true, smokeTest: true, ping: 346 } }
2024-02-21T15:03:01.570Z cypress:server:args argv parsed: { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, smokeTest: true, ping: 346, invokedFromCli: false, cwd: '/Users/dan/work/apps' }
2024-02-21T15:03:01.571Z cypress:server:util:proxy found proxy environment variables {}
2024-02-21T15:03:01.572Z cypress:server:args options { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, smokeTest: true, ping: 346, invokedFromCli: false, cwd: '/Users/dan/work/apps', config: {} }
2024-02-21T15:03:01.572Z cypress:server:args argv options: { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, smokeTest: true, ping: 346, invokedFromCli: false, cwd: '/Users/dan/work/apps', config: {}, pong: 346 }
2024-02-21T15:03:01.572Z cypress:server:cypress from argv [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress', '--no-sandbox', '--smoke-test', '--ping=346' ] got options { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, smokeTest: true, ping: 346, invokedFromCli: false, cwd: '/Users/dan/work/apps', config: {}, pong: 346 }
2024-02-21T15:03:01.600Z cypress:server:appdata path: /Users/dan/Library/Application Support/Cypress/cy/production
DevTools listening on ws://127.0.0.1:57259/devtools/browser/df32d1d2-7b95-48e7-8771-ec4a9048ffc4
2024-02-21 17:03:01.630 Cypress[10864:1570941] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
2024-02-21T15:03:01.661Z cypress:server:cypress starting in mode smokeTest with options { _: [ '/Users/dan/Library/Caches/Cypress/13.6.5/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, smokeTest: true, ping: 346, invokedFromCli: false, cwd: '/Users/dan/work/apps', config: {}, pong: 346 }
2024-02-21T15:03:01.664Z cypress:server:cypress running Electron currently
2024-02-21T15:03:01.668Z cypress:server:cypress about to exit with code 0
2024-02-21T15:03:01.668Z cypress:server:browsers browsers.kill called with no active instance
----------
Platform: darwin-arm64 (23.3.0)
Cypress Version: 13.6.5
Could y'all specify which Mac you're using? Intel/M1/etc, and which Mac OS? (Sonoma, etc)?
We didn't change anything directly within the verification code. My suspicions is this has to do with our Electron upgrade. There's oftentimes some unexpected errors whenever we upgrade Electron regardless of how much we test it.
M1 with Sonoma 14.3.1
@jennifer-shehane I'm using an M2 Max with Sonoma 14.2.1. I've also reproduced it in CI agents running on Ubuntu 22.04. This is also using Nx, though Nx is actually running cypress run
as shown in the debug logs. Running cypress run
directly works fine. I work at Nx, so I'd be happy to provide more info or try some things as needed to get this solved.
We have an example of this failing in one of our pipelines using NX, so that seems to be one of the key identified factors. If you're experiencing this issue without use of NX, that'd be good info to have.
BTW every JHipster workflows is failing with 3.6.5. https://github.com/jhipster/generator-jhipster/pull/25282
Version 3.6.4 is working as expected at main branch. Not using NX.
@mshima We're working on identifying the issue to get a fix out asap. For now, we suggest downgrading to 13.6.4 for NX users.
We've identified a possible solution on our side and will work on getting a patch fix out.
Unfortunately, there doesn't seem to be a workaround that users of NX can do in the meantime in order to use Cypress 13.6.5.
We have the same issue on an Nx repository. Confident it is not cache related as we cache using a has of package.json and package-lock.json.
Yeah, it's not cache related and won't be fixed by clearing the cache unfortunately. You'll have to downgrade to 13.6.4.
This issue has some relation to how NX handles ansi colors in the CLI (somewhat relevant thread here explaining how they override some things: https://github.com/nrwl/nx/issues/8051)
In 13.6.4, the random output after the binary warning is not ansi colored. (See 532 number)
In 13.6.5, the random output after the binary warning is ansi colored yellow. (See 781 number)
When we attempt to compare this random number during verification, since it's wrapped in ansi coloration - the verification fails. I can't say this was the most elegant way to code the verification to begin with, but that's where we are.
This issue was introduced in the Electron 27 upgrade in 13.6.5: https://github.com/cypress-io/cypress/pull/28792 We still have no idea why that change had an effect on this.
We plan to try to remove colors completely during the verification step to see if that will resolve the issue. Passing an env var to turn off colors from the parent process has no effect, so it isn't available as a workaround.
Released in 13.6.6
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v13.6.6, please open a new issue.
Current behavior
After upgrading to v 13.6.5, running Cypress throws "Cypress verification failed.".
Desired behavior
Should not fail after upgrading
Test code to reproduce
cypress open
Cypress Version
13.6.5
Node version
20.11.0
Operating System
macOS
Debug Logs
Other
No response