little-byte-59792
01/30/2023, 10:01 AMRunning: registration/registration.cy.ts (26 of 38)
<--- Last few GCs --->
[1842:0x7fc7b8008000] 569883 ms: Mark-sweep 4051.8 (4143.5) -> 4036.2 (4144.0) MB, 1933.5 / 0.0 ms (average mu = 0.119, current mu = 0.015) allocation failure scavenge might not succeed
[1842:0x7fc7b8008000] 571794 ms: Mark-sweep 4045.7 (4144.0) -> 4036.2 (4144.0) MB, 1536.6 / 0.0 ms (average mu = 0.155, current mu = 0.196) allocation failure GC in old space requested
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x101b7f5f5 node::Abort() (.cold.1) [path/to/node/v16.18.1]
2: 0x100874f49 node::Abort() [path/to/node/v16.18.1]
3: 0x10087512e node::OOMErrorHandler(char const*, bool) [path/to/node/v16.18.1]
4: 0x1009ec3f0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [path/to/node/v16.18.1]
5: 0x1009ec3b3 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [path/to/node/v16.18.1]
6: 0x100b90095 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [path/to/node/v16.18.1]
7: 0x100b940dd v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [path/to/node/v16.18.1]
8: 0x100b909bd v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [path/to/node/v16.18.1]
...
Documentation says :
## Memory
* 4GB minimum, 8GB+ for longer test runs
https://docs.cypress.io/guides/getting-started/installing-cypress#Memory
What does longer test run means?
I see a warning:
Trace: The new-window event is deprecated and will be removed. Please use contents.setWindowOpenHandler() instead.
at Object.log (node:electron/js2c/browser_init:225:603)
Who can help?
Cypress 12.4.1
npm 16.18.1little-byte-59792
01/31/2023, 6:32 PMfamous-energy-17408
01/31/2023, 8:33 PMbroad-businessperson-13175
01/31/2023, 11:57 PMexperimentalSessionAndOrigin in Cypress version 12. You no longer need to have the experimental flag for version 12+.
Increase your node memory --max-old-space-size: https://stackoverflow.com/questions/48387040/how-do-i-determine-the-correct-max-old-space-size-for-node-js
If the issue continues:
Try using a different browser that isn't chromium-based, like Edge: https://docs.cypress.io/guides/guides/launching-browsers#Browser-versions-supported
Decrease your numTestsKeepInMemory to lower your memory consumption: https://docs.cypress.io/guides/references/configuration#Global
Cypress 12.4 or higher a new feature was released experimentalMemoryManagement to improve memory management in Chromium-based browsers.