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 slows down and then crashes during cypress run

See original GitHub issue

Hey there, I’m new to Cypress and things we going well, but now things are starting to crash now that I have a larger test suite. I’ve noticed that this sort of issue was filed a bunch of times before (https://github.com/cypress-io/cypress/issues/431) but I’m just not sure what I should be doing to fix the issue…

Current behavior:

Here’s an error report from Terminal when running with Electron 59. Things started to get pretty slow before it completely died.

<--- Last few GCs --->

[68129:0x7ff0b0854800]   198798 ms: Mark-sweep 2053.6 (2155.9) -> 2053.6 (2140.9) MB, 1574.1 / 78.1 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1574 ms) last resort
[68129:0x7ff0b0854800]   200480 ms: Mark-sweep 2053.6 (2140.9) -> 2053.6 (2140.9) MB, 1681.6 / 78.6 ms  last resort


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0xa0bb29f87e9 <Window map = 0x2039cbd43f99>
    2: getInitialState [http://localhost:3000/app.js:415928] [bytecode=0xabd9ae04d21 offset=1](this=0x2e5ba689d021 <ResizeStore map = 0xcd2a0fbe271>)
    4: constructor(aka Store) [http://localhost:3000/app.js:418152] [bytecode=0xb271520bc51 offset=39](this=0x2e5ba689d021 <ResizeStore map = 0xcd2a0fbe271>)
    6: new constructor(aka ResizeStore) [http://localhost:3000/app.js:41...

Those constructors are objects in my code. I don’t think there’s a memory leak in my application code. I have a few custom commands that access some objects off of the window but I’m navigating around which should garbage collect everything. Not sure what Cypress is doing internally… Maybe its keeping everything around?

Also, happy to try whatever you want to see if we can get this working 👍 I really like everything else about Cypress!

Versions

ProductName: Mac OS X ProductVersion: 10.14 BuildVersion: 18A391

Cypress: 3.1.5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:41 (7 by maintainers)

github_iconTop GitHub Comments

15reactions
ccorcoscommented, Aug 12, 2019

It has been 5 months with no progress on this issue. I would not rely on Cypress fixing this issues. I’ve moved my company on to using the selenium-webdriver package. The only (small) hurdles were implementing my own retry-timeout and wrapping errors into better error messages.

For now, I’m going to close this issue because it is not making progress and is giving people a false sense of hope.

6reactions
ccorcoscommented, Mar 27, 2019

After adding the "numTestsKeptInMemory": 1 option, running from the GUI succeeds without crashing. 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Cypress Documentation
If you're having an issue during installation of Cypress, try removing the contents of the Cypress cache. This will clear out all installed...
Read more >
Cypress long automation script crashes the Chrome browser ...
The most obvious one is that cypress run is headless. It starts an Electron browser in the background and performs all your tests....
Read more >
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 >
End-To-End Testing with Cypress - Learn With Jason
GLEB: Absolutely. It might slow you down at first. Like the first day. If you have to bring tools, maybe learn something new...
Read more >
Conditional Testing - cypress - w3resource
In this tutorial, you will learn when it is a good choice to use conditional testing for your tests.
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