Open rdwentmp opened 11 months ago
@rdwentmp
According to your issue description, you are using Node.js v14.21.3
, which reached end-of-life on Apr 30, 2023 and is no longer supported.
Please check the Changelog for Cypress 13.0.0 and follow the recommendations there:
v13
, but will not be supported moving forward to closer coincide with Node 16's end-of-life schedule. It is recommended that users update to at least Node 18.Ah that's really sad news, it looks like I missed that, will try to update node then
@rdwentmp We'll need some set of tests to run to see the issue and investigate, if the upgrade doesn't help.
After
update node version to 20.10.0 the error still randomly occurs. In this case I can put some code when the default start to occur from the screenshot:
changeCtrOwner(ctrOwner: string) {
cy.message(`changeCtrOwner`)
this.interceptChangeCtrOwner()
this.interceptDelegateUsers()
return this.getPxdRigidPipeAndFlowDesignCell()
.should('contain.text', ctrOwner)
.trigger('mouseenter')
.then(() => this.getPxdEditOwnerBtn().should('be.visible').click())
.then(() => this.waitDelegateUsers())
.then((engineerNames) => {
let newOwner = selectRandom(engineerNames)
let newOwnerFullName: string = newOwner.fullName
cy.message(`Change CTR owner to ${newOwnerFullName}`)
this.selectCtrOwner(newOwner.fullName)
.then(() => this.getDoneBtn().should('be.visible').click())
.then(() => this.getYesConfirmBtn().should('be.visible').click())
return this.waitChangeCtrOwner().then(() => {
return cy.wrap(newOwnerFullName)
})
})
}```
This Default blank page error usually occur on second attempt after failed test
I have same problem , after every test case , the blank page appears
I am also facing same issue 😞
I just added this line in cypress.config.js and it has started to work
I am also facing same issue 😞
This Default blank page error usually occur on second attempt after failed test
I just added this line in cypress.config.js and it has started to work
I am also facing same issue 😞
This Default blank page error usually occur on second attempt after failed test
I was having this same problem today and your solution helped me solve it, thank you very much! ☺
https://docs.cypress.io/guides/core-concepts/test-isolation#Test-Isolation-Disabled the tradeoffs for this solution ^
I am facing the same issue, if it can help, I am running tests on Windows. For the other people facing that issue, are you also running tests on windows?
cypress Versjon 13.7.0 (13.7.0.2514066)
stil having the same issue, on mac OS 14.3.1 even tho i have changed the cypress.config.js to
Having same issue when running tests using headless browser only
I am also facing the same issue with chrome , cypress 13.7.3 and testIsolation: false Randomly occurs
The same issue that people above have. All my tests are snapshot verifications and I do up to 4 retries. Occasionally some tests after a second retry drop into a blank page.
This was not the issue in Cypress v13.4.0, but it seems it started happening somewhere around v13.5
I did have testIsolation: false
in config already and it does not help at all.
I am having the same issue today on v13.8.1. Like someone else here, I see it MOST of the time, but not all the time (like 98% of the time I get the bug. Didn't get it the first time). I also added testIsolation: false to my config, and it didn't help me any.
But I think I've found a workaround! It's a really laaaaame workaround, but in a pinch, maybe it'll help: just tuck everything into just ONE big test body section!
EXAMPLE: This version of my test case with the meat of it looking like THIS failed. Step 1 worked right, to go to my designated URL, but then it went to a blank page right before 'Click on Text Box'
... but once I changed it to THIS, it succeeded! The only difference is that I moved all the "cy." commands under just one heading:
Please take all of this with a big pinch of salt... and PLEASE forgive any use on my part of poor terminology! As you can probably guess from the screenshots, it's only my first week learning Cypress.
This helped me solve the issue.
With testIsolation
enabled I had to do a new cy.visit()
within the spect (in a beforeEach in my case)
Do we have any news on that issue ? I got the same issue on my side and 'testIsolation' is not the good solution for it.
@proko podrías compartir como lo solucionaste? te lo agradeceria.
Do we have any updates on the above issue? I'm also getting the same problem after upgrading the cypress v 13. 'testIsolation' doesn't work for me.
I got a temprorary fix for now. I add an additional function in a generic beforeEach() in order to detect if the application is loaded or not and if it's not I am cy.visiting again.
I hope Cypress Team will provide a better solution for this :)
Any new update on this ?
Currently we do not regard this as an issue with Cypress. This change was intended to clear the page between tests.
If someone can provide an example to run where the tests are behaving in a way that is not intended by Cypress, we can investigate.
If you don't want your page to be cleared between tests, pass testIsolation: false
to your cypress.config.js file to opt out of this behavior.
I believe there’s a misunderstanding in my original post. The behavior I’m reporting is inconsistent, and it’s not related to the testIsolation configuration.
Consider a Cypress end-to-end testing file with multiple tests within a describe block (e.g., describe(it(...); it(...); it(...); ...)). Additionally, I've configured Cypress with the following settings:
retries: {
openMode: true,
runMode: true,
experimentalStrategy: "detect-flake-and-pass-on-threshold",
experimentalOptions: {
maxRetries: 2,
passesRequired: 1,
},
},
Here’s the observed behavior:
When Cypress encounters a failure during the initial test run, it doesn’t clear the page and retries the test according to the specified configuration (in this case, up to 2 retries).
However, if another test within the same run fails and Cypress attempts a retry, it does clear the page. This behavior differs from the initial test runs.
Please let me know if this explanation makes sense, or if you’d like me to provide clear examples.
@naseradd The original issue didn't mention using experimental retries. Is this issue isolated to experimental retries then?
Or does this behavior happen with just standard 'retries: #' set also.
This makes more sense to possibly have a situation where the state is not correctly reset on some retries but it is reset on others.
Is there any fix to the above issue?
Hi team, I was getting this error while runAllSpecs files on start of second file execution : Default blank page This page was cleared by navigating to about:blank. All active session data (cookies, localStorage and sessionStorage) across all domains are cleared.
Adding this line
testIsolation: false in cypress.config.js worked for me! Thank you so much for this solution!
I tried to reproduce the defect with a simplier sample but I am not able to reproduce it anymore unfortunately
testIsolation
off is not a long term solution / good practice - please just no.+1 added testIsolation: off
solved the issue for me
Got the same issue, using next
experiencing the same issue on:
Cypress: 13.7.3
Browser: Chrome 123 (headless)
Node Version: v20.12.2
This is my config:
module.exports = defineConfig({
chromeWebSecurity: false,
defaultCommandTimeout: 15000,
reporter: "cypress-multi-reporters",
reporterOptions: {
configFile: "cypress-reporter-config.json"
},
retries: 3,
viewportWidth: 1280,
viewportHeight: 1024,
pageLoadTimeout: 120000,
env: { CI, CYPRESS_OVERRIDE_MF_TEST_VERSION: process.env.CYPRESS_OVERRIDE_MF_TEST_VERSION },
urlPort: port,
urlDomain,
e2e: {
testIsolation: false,
baseUrl: `http://${slug}.${urlDomain}${port}`,
supportFile: "cypress/support/e2e.js",
specPattern: "cypress/integration/**/*.{js,jsx,ts,tsx}",
excludeSpecPattern: [
"cypress/integration/*/helpers/**/*.{js,jsx,ts,tsx}",
"cypress/integration/*/constants/**/*.{js,jsx,ts,tsx}"
],
setupNodeEvents(on, config) {
if (process.env.CI === "true") {
require("dd-trace/ci/cypress/plugin")(on, config);
}
registerPlugins({ on, webpackPath: path.resolve(__dirname, "./webpack.config.js") });
compareImagesPlugin(on);
cypressLogToOutput.install(on, (type, event) => {
if (event.level === "error" || event.type === "error") {
return true;
}
return false;
});
}
}
});
Any help would be appreciated. Issue is inconsistent and happens randomly on different specs.
Current behavior
During Cypress run the application page disappear and appear default blank page, after that test scenario fail with visibility of inputs. The issue occur randomly on different test scenarios, possibly some memory leak. The Default blank page errors start to occur after upgrade Cypress version from 11.2.0 to 13.0.0. I already set up migration guide and had to set up testIsolation: false, without that every test occur with default blank page, but still after done everything right the default blank page still occur random. I think it looks like memory leak
Desired behavior
Cypress behave stable without clearing cache with appearing Default blank page
Test code to reproduce
Cypress Version
13.0.0
Node version
v14.21.3
Operating System
linux, macos
Debug Logs
Other
No response