cypress
cypress copied to clipboard
Full Chrome Browser crash about 80% of the time on input.clear() + {enter}
Description
This is a weird weird one. I log it for posterity and maybe those who know more about Cypress will understand it. When running multiple test folders locally, the whole Chrome process crashes (the We detected that the Chrome Renderer process just crashed. crash) on the third test. Always on that third test.
If I comment out that third test, all 17 other tests pass.
Now the tricky parts:
-
If I execute just the folder containing that test, all good. no crash!
-
Here's the code where it crashes:
function clearTableSearch() {
cy.get('.filter-search').find('input').as('searchBox')
cy.get('@searchBox').clear();
cy.get('@searchBox').type('{enter}');
}
Nothing fancy here, but if I add a cy.wait(500); just after the clear(), all good, no crash!
- Weirder still, if I click to expand / collapse the test "text logs" while the tests are running, then all test pass, no crash... !?!
I've reproduced this many many times while trying to understand what is causing the crashes. I doesn't crash 100% of the time, but like 80% so that running tests on an automated build process is impossible.
I'd like to help debug further, but I have no idea how to help
URL of Issue(s)
localhost
Browser
Cypress v13.14.1
Chrome 128
ChromeDriver 128.0.6613.119 (6e439cfca4deda5954b0c74cde9b521c03cb31ad-refs/branch-heads/6613@{#1464})
Tested with Electron v118 too.
Device
- [X] PC
- [ ] Mac
- [ ] iPhone
- [ ] iPad
- [ ] Android Phone
- [ ] Android Tablet
Additional Information
Machine specs: AMD Ryzen 7 5800X running around 35% 32 GB of RAM (around 71% in use while running the tests)
Tried with and without experimentalMemoryManagement=true numTestsKeptInMemory=0
@dstj Yah these types of issues are very hard to track down. We have an issue that's tracking some of these cases in general here: https://github.com/cypress-io/cypress/issues/27415
Essentially it could be something on our end, or it could be something within the website being tested that is using up too much memory. We'd need a way to reproduce it to track down what the root cause it if you can provide that.
@jennifer-shehane Yes, I image it can be very hard to pinpoint the cause. I cannot provide a reproduction as it's happening in my main, complex app test cases, but can I provide any cypress logs or something that help identify the cause a bit more?
The Browser cypress memory footprint is around 450 MB (or so the Chrome Task Manager says) I just ran the tests 6 times (only one crash), the footprint seems to increase to 500MB, than 520MB, than 550MB, than 600MB but always falls back to 430MB after being idle for a while.
We ran into a similar issue, and while it's not the right fix, we've temporarily (hopefully) bypassed it by setting chrome to 127
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
This issue has been closed due to inactivity.