-
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
'Aw, Snap' error screen shown when test runs over 250 seconds (approx) intermittant #1906
Comments
Just checked and this seems to be even more of an issue in 3.0.2 |
So just to give a bit more information so this can be looked into further... The issue seems to be happening less back on 2.1.0, it increased in 3.0.1 and is happening more often in 3.0.2. Not sure what has been introduced an updated since 3.0.1+ but it's getting worse, it occurs when running over 200s although there isn't a specific time as it varies. |
@shaunswales have you found any workarounds for this yet? I'm running into this on 3.0.2 as well. |
same issue, was able to reach ~2100 seconds at one point, but generally crashes around 200-300 seconds |
Same issue |
+1 same story |
Hello, I have tried few solution and it is working for me at the moment but I am still in testing mode with different scenario. In Cypress.json {
"requestTimeout" : 30000,
"numTestsKeptInMemory": 0,
"responseTimeout" : 50000,
"pageLoadTimeout": 100000
} This is what I have changed. I got reference from MySameQuestion |
Happening to me as well but only for EditThe issue started happening with |
Try adding {
"numTestsKeptInMemory": 0,
} In your |
Happening to me as well. As mentioned by @Prashant-Kan, changing Do note that by setting Just wondering, as I notice Cypress runner saves the snapshot temporarily on the memory, isn't it possible to save it to a file (maybe an option) instead every x MB/test, so as to limit/lessen the possibility of |
We're experiencing this consistently with a long-running test that visits different SaaS systems. It gets towards the end of the test, then crashes Chrome w/ the 'Aw, Snap' message.
|
Some further updates:
I think this is a different bug, & will raise as a new issue. |
Hi, duncan-bayne: I got reference from MySameQuestion Check the explanation in the above-mentioned link maybe you will get your solution. |
It isn't work for me. Browser still crashes during long tests. |
@Boczarsky : Correct, Even it fails for me too (now) earlier it was getting passed. But, When my number of steps for the particular testcases increases which eventually increases the Memory, which results in browser crash. if, Anyone else faces this issue and has the solution please do guide us. |
This is a big issue at our department where we are doing big end to end testing as we can't do tests taking longer then 250s... |
Unfortunately we'll have to close this issue if no reproducible example is provided. Can anyone provide a way to reproduce this? |
@jennifer-shehane the problem is still appearing in version 3.1.5. |
@azollai I've been unable to reproduce this using your suggestion. My example ran for 569 seconds. We will need the issue narrowed down more - to specifically what to run to reproduce it. My test code: let times = 1000
for (let i = 0; i < times; i++) {
it('.focus() - focus on a DOM element', () => {
cy.visit('https://example.cypress.io/commands/actions')
cy.get('.action-focus').focus()
.should('have.class', 'focus')
.prev().should('have.attr', 'style', 'color: orange;')
})
} Edited by @jennifer-shehane - Added correct screenshot. |
@jennifer-shehane: This is Cypress 3.1.5 or unreleased Cypress 4? What is |
@jennifer-shehane: I have the same problem, I'm running only a inserts of users on a form, it work fine whether I set only litle numbers of users but if I increase that number like 30 or more the browser break. The browser also break when I try to run a bunch of tests, like 6 or more tests, which make others things. I'm running cypress in windows with git bash. My cypress.json {
"animationDistanceThreshold": 5,
"baseUrl": "http://localhost:30445",
"blacklistHosts": null,
"chromeWebSecurity": true,
"defaultCommandTimeout": 4000,
"env": {},
"execTimeout": 60000,
"fileServerFolder": "",
"fixturesFolder": "cypress/fixtures",
"hosts": null,
"integrationFolder": "cypress/integration",
"modifyObstructiveCode": true,
"numTestsKeptInMemory": 0,
"pageLoadTimeout": 100000,
"pluginsFile": "cypress/plugins",
"port": null,
"reporter": "spec",
"reporterOptions": null,
"requestTimeout": 30000,
"responseTimeout": 50000,
"screenshotsFolder": "cypress/screenshots",
"supportFile": "cypress/support",
"taskTimeout": 60000,
"testFiles": "**/*.*",
"trashAssetsBeforeRuns": true,
"userAgent": null,
"video": true,
"videoCompression": 32,
"videoUploadOnPasses": true,
"videosFolder": "cypress/videos",
"viewportHeight": 660,
"viewportWidth": 1000,
"waitForAnimations": true,
"watchForFileChanges": true
} Version output
My set test it('Login', function ()
{
cy.visit('http://localhost:30445/#/login')
cy.get('#usr').type('My_username')
cy.get('#pwd').type('My_password')
cy.get('#confirm').click()
})
it('Set Users', function ()
{
cy.get('#listuser').click()
for(var i =0; i < 300; i++)
{
cy.get('#addUser').click()
cy.get('#name').type(`User Test ${i + 1}`)
cy.get('#btnConfirm').click()
}
}) |
@EduMotaControliD Is there any way to provide some tests that break that we can run locally? |
This happens to me if I am running tests through the GUI and select run all specs. I have 10 specs each one taking 1-3 minutes to run a piece. I get 3/4ths done and get oh snap errors. For me, it doesn't matter how long an individual test is running but a group of specs running over a certain time limit crashes my app. I am uncertain how to share my tests since they concern private things my company would not like me to share. Is there a way to spy on the error message for the GUI test runner that could help debug it? my spec files have one describe block with a before each block and many it blocks underneath it. Our site does polling so during the tests there may be graphql queries being fired while i interact with the site. edit: the browser crashes after 5 minutes but is unresponsive to scrolling the left panel at around 3.5 minutes. |
I found that having the dev tools open allows chrome to catch the |
Suffering the same issue. Apparently the |
Sorry I didn't realise this was still open, yes that is what I needed to implement. The reason being within windows the application is a 32-bit application, with the tests kept in memory this meant that everything within the DOM for each action was stored. This eventually went over the memory limit for a 32-bit application. |
Argh even Elektron is not 100% reliably and shows an empty screen unless I manually execute one test script at a time using --watch |
This solution doesn't work if you want to review and debug failing tests in the browser |
@b-pmcg using numTestsKeptInMemory is unfortunately not a useful solution because if you're running with --watch then you need to keep the snapshots which cause the problems to see anything (especially because 0 won't even keep the currently failing set of snapshots in memory.) I have not actually seen the error when not running with --watch in which case snapshots are also not required, but then without video and combing through those videos it's difficult to develop test scripts. I think there needs to be a better solution or a way to save and restore snapshots from disk. Another thing that might be good is to be able to run several tests (not all) but be able to select a few, run them and see the results. Basically I have about 40 tests which will fail if I run them all, but if I run one at a time I will be there about 1/2 hour. It would be nice to be able to run 20 and then run another 20 without needing to change the code to skip some and not others. Then I can easily exclude the tests that take up too much memory and run them at the end separately. |
Getting this regularly with long test runs in Chrome locally. all the below set "numTestsKeptInMemory": 0, |
Getting this as well with "numTestsKeptInMemory": 10, |
Still happening on 10.3.0. I can't get through more than 5 minutes of tests before Chrome runs out of memory. |
I have raised this new issue for the same context (Cypress 10.4.0) #23131 |
same problem with the lastest cypress version :-( |
Same problem since cypress v8.3 |
In regards to the reselect-dragged-fix, I added checks on whether the element is reselected after it has been dragged. One other thing that has been changed in this commit is: Drag tests have been crashing, and I think it's due to the sheer number of them in one file. I also set `numTestsKeptInMemory` to 0, which may help with this crashing issue. Related: cypress-io/cypress#1906
#23193 #23131 Tickets for same issue @SinghPramender |
My team was struggling with this issue recently. We found that using Chrome 94 (instead of 104) resolved the issue for us. |
Got this issue today with cypress 9.5.2..I have 16 specs and it crashed in the 10th one. This happened when using the cypress GUI..If any other details is needed pls let me know. |
Got this issue with Cypress 8.4.1 and the runner crashed with out of memory error after running a couple of tests out of 12 total tests. The same file ran okay before. |
Same issue |
Same issue and I tried all the solutions users posted above. |
There appears to be a bug with Chrome 104 that has reduced memory limits for a tab (possibly). One of the comments even mentions Cypress crashing in 104, but not 103 You may also benefit from running garbage collection between tests, if you aren't already. For cypress 10+ users, the changes recommended here are different because of the Cypress changes to the plugins file. |
Enabling garbage collection between tests have not worked either unfortunately. |
@CoryDanielson On further observation it was observed that, chrome version used was 104 from 10th Aug 2022 and until that date it was 103. |
See this issue for more details. This is the only open issue related to this on Cypress at the moment I saw somewhere that Chrome 105, and 106 canary still have the same issue. So it may be a while before this is resolved. Downgrading to Chrome 103 is temporary work around |
Today the issue still persists. Latest version of Cypress - v12.9.0, latest version of Chrome - v111. Running tests for more than 5 mins causes the "Aw snap" error. Please, you need to find a stable solution for cypress open. It is not suitable for a big project when people are relying on automation tests... |
@scorpyto maybe try experimentalMemoryManagement: true in cypress.config.js ? |
already Implemented :/ |
Hi @scorpyto Can you please open a new issue for your specific use case with a reproducible example? We will be happy to look at that. |
|
Same problem. Adding numTestsKeptInMemory=0 in cypress.config.js fixed it (default is 50). Full instructions & example here: |
Hi I am also facing this problem. I added "numTestsKeptInMemory ": 0 in the cypres.config.js this way and now happily working: const { defineConfig } = require("cypress");
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = defineConfig({
numTestsKeptInMemory: 0,
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
on('file:preprocessor', cucumber())
},
specPattern: "cypress/e2e/Features/*.feature",
},
}); |
Current behavior:
Cypress when tests seem to run over 200 seconds you are sometimes presented with a screen showing the following:
'Aw, Snap! Something went wrong while displaying this webpage. Learn More / Reload'
Screenshot:
Desired behavior:
Shouldn't timeout.
Steps to reproduce:
Runs tests around 300s plus using the Chrome browser.
Versions
Version: 2.1.0 to 3.0.2
The text was updated successfully, but these errors were encountered: