'Out of Memory' error when there are heavy assertion logs printed in Cypress Test Runner
See original GitHub issueCurrent behavior
Cypress Test runner crashes with error ‘Out of Memory’.
Desired behavior
In this situation, Cypress should contract itself with ‘Read more’ or ‘Read less’ links in the assertion logs or if the cypress log is heavy it should dump the logs into local storage.
Test code to reproduce
The below line of code prints the complete JSON response from the API in the logs while asserting and hence the out of memory error occurs.
expect(JSON.stringify(resp1.body)).to.include('DynamicColumns')
Below is the complete code to reproduce:
File example.cy.js
cy.request('https://devxxx.office.nl/Grid/ApplyFilter').as('req1').then((resp1)=>{
//expect(JSON.stringify(resp1.body)).to.include('DynamicColumns')
cy.get('@req1').should('have.property', 'status', 200)
})
Cypress Version
10.3.1
Other
No response
Issue Analytics
- State:
- Created a year ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Error Messages | Cypress Documentation
We found an error preparing your test file. This message means that Cypress encountered an error when compiling and/or bundling your test file....
Read more >Fixing Cypress errors part 1: chromium out of memory crashes
When I decided to try this, I found out that the project already had this fix in place, but it was using the...
Read more >Cypress test failing with "out of memory" error in docker
"Out of memory" error you see because chrome under docker has 64MB restricted memory by default which sometimes is not enough.
Read more >How to Test Your Apps using Jest, Testing Library, Cypress ...
Automated testing is done through code, writing programs that check how our application runs. There're many testing frameworks and libraries we ...
Read more >Add Timestamps To Cypress - Gleb Bahmutov
Sometimes a test fails due to some API service failing to work. You need to debug the service logs, the first piece of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am also having the same issue. My test runs for about 8 minutes and then crashes with Aw, Snap! Error code: Out of Memory. I use
numTestsKeptInMemory:0
and the memory footprint does not exceed 2,600,000K but it still crashes every time. The strange thing is that one week ago my test was running fine for 23 mins and this week it cannot run for more than 8 minsSame problem since cypress v8.3 I think this requires urgent look because its getting worse when we have to use numTestsKeptInMemory:0 every time
My machine is having high configuration (16 GB RAM, SSD and i7 10th generation processor).
I am looking of the solution other than numTestskeptInMemory.