-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cypress Open Crashing Chrome with "Aw Snap" after upgrade to Chrome 100 #21135
Comments
@davidmunechika, did you have a chance to reproduce this against the 10.0-release branch? Just curious if it'll still be an issue before long. |
@rockhold - I've confirmed this for both 9.x and 10.x. Chrome/Chromium 100/101 with Cypress seems to use more memory than previous versions. I did a bit of searching around Chromium bugs, and the best I've found is https://bugs.chromium.org/p/chromium/issues/detail?id=1309201#c9, which seems to indicate that the Chrome team is aware of some ongoing memory issues introduced around Chrome 100 and not yet resolved in 101; I don't know enough of the internals to make complete sense of this conversation. With that said, I suspect that this in a Chromium regression, which Cypress will be powerless to resolve. :( Perhaps 102 or 103 will contain more solutions. |
The issue they mention related to |
If that's the case then maybe we shouldn't update the embedded Chromium in Electron to v100 yet... @BlueWinds can you check our perf charts and see if there's anything egregious in there |
@brian-mann, we have already updated chromium in electron to v100 #21418 |
NB: The NPM package is actually on v9.7.0, but ≥9.5.4 upgrades Chrome to v100 and does not run in GitHub Actions ([perhaps due to memory problems?](cypress-io/cypress#21135)) #patch
NB: The NPM package is actually on v9.7.0, but ≥9.5.4 upgrades Chrome to v100 and does not run in GitHub Actions ([perhaps due to memory problems?](cypress-io/cypress#21135)) #patch
NB: The NPM package is actually on v9.7.0, but ≥9.5.4 upgrades Chrome to v100 and does not run in GitHub Actions ([perhaps due to memory problems?](cypress-io/cypress#21135)) #patch
NB: The NPM package is actually on v9.7.0, but ≥9.5.4 upgrades Chrome to v100 and does not run in GitHub Actions ([perhaps due to memory problems?](cypress-io/cypress#21135)) #patch
I can still reproduce this on Cypress 10.0.3 using Chrome. If the test kept in memory is set to 0, it is all good, no crashes with any browser. |
Seeing this very reproducibly on certain tests with Cypress 12.9.0, both Chrome 112 and Electron 106. Firefox works flawlessly though 🦊 |
Any update, improvement? |
This happens to me on latest version of Cypress - its not a machine resource issue, running latest Chrome 64GB Ram and latest Intel chip. I notice its todo perhaps with the site being tested, site using Angular Framework, happens at certain points. |
Have folks tried using the config flag |
It's been a couple of weeks and I have not heard back from folks. I am going to close this issue. If you are still encountering this issue after turning on that config flag, please open a new issue and we will be happy to investigate. Please note this issue in your comment. |
@nagash77 you said that if we are running a large single test this change will likely not improve performance for us and breaking a large test into smaller tests may be beneficial. Since that was true for me, I did not reply. I was trying to run a large single test. Unfortunately breaking the test into smaller tests is not an option for me in this case. |
@brandonLyonMM please open a new issue with your specific use case and we will be happy to investigate. Please mention this ticket in your issue. |
I'm running into a similar issue where a single test does many things, and it is hard to break the flow. |
No I did not |
I am still facing the same issue after 12.4.0. |
Agree!
There are only 5 regions and almost in 50% of runs browser is crashes! If I separate this test to 6 tests
tests pass OK @nagash77 please take a look at this crashes! People still have the problems! |
@andreynav Unfortunately your reproduction is incomplete so I am unable to review it to identify what your issue is - the shape of the If you have a complete reproduction that you believe demonstrates a legitimate memory issue in Cypress I invite you to open a new issue so we can investigate |
@mike-plummer https://www.loom.com/share/0f4c387b11964f57a4c4ddf90ec5547e Once the memory consumption reaches 6-7GB, the browser crashes. Same with Electron, same with Edge. I do not see a valid reason to close this ticket, when all these people are still facing the same issue. |
@extracker-ppetrov I've reopened as requested - can you provide a reproduction case that demonstrates the issue while following Cypress' existing recommendations around reducing memory use? These recommendations primarily revolve around the fact that Chromium renderer processes are restricted to ~4GB of JS memory heap. There are many things you can do to reduce the risk of exhausting memory:
|
@extracker-ppetrov are you able to provide a reproducible example using Cypress Test Tiny? |
Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen. |
Happens all the time even with tests kept in memory set to 0. This is actually making cypress unusable at present and needs fixing. |
Cypress crashing so much that makes it unusable, sadly my company is looking to move away from cypress because of this, wish you the best |
@juliancastroorozco @LouisGinger Please comment or open a new issue detailing what is happening and providing a reproducible example of that issue. We can't assist without having a way to reproduce this ourselves. We run 1000s of tests every minute in Cypress, so it must be something specific to your application, test suite, environment, browser, etc - there's lots of factors for us to track down. |
Current behavior
When running Cypress Open with multiple tests, Chrome 100 is more likely to crash with an "Aw, Snap" error message than previous versions of Chrome:
I was able to determine that Chrome 100 is more likely to crash by using a Chromium version from https://chromium.cypress.io/. I was then able to run the standard Cypress Tests examples with Chrome 99.0.4844.0 by specifying "npx cypress open --browser "pathToChromiumVersion\chrome.exe"
Here is three screenshots from running cypress open showing memory footprint with Chrome 99 using the Cypress Examples:
Here is three screenshots from running cypress open showing memory footprint with Chrome 100 using the Cypress Examples:
Desired behavior
I believe that Cypress should be able to keep a similar memory footprint between Chrome 99 and Chrome 100 or provide a better way to garbage collect between tests.
I have looked at using numTestsKeptInMemory (https://docs.cypress.io/guides/references/configuration#Options) but we only have 14 tests in our build verification suite.
I would also like to have the numTestsKeptInMemory configurable to only keep tests that have failed in memory instead of the last X tests.
Test code to reproduce
Using Cypress Version 9.5.4 (as well as other versions), Cypress Examples that are installed with cypress on npm install -D cypress
Cypress Version
9.5.4
Other
No response
The text was updated successfully, but these errors were encountered: