cypress: window.Cypress is undefined
- Operating System: OS-X 10.12.5
- Cypress Version: 1.1.2
- Browser Version: Chrome 62.0.3202.94
Is this a Feature or Bug?
bug
Current behavior:
Cypress randomly crashes after visiting website. (cy.visit('https://url'))
Desired behavior:
It would be nice without the crash 😄
Test code:
Cypress.Cookies.debug(true);
Cypress.Cookies.defaults({
whitelist: cookieName,
});
// -- This is a parent command --
Cypress.Commands.add(
'login',
(username, password) => {
cy.request(`${domain}netcenter/nacJS/loadNacProfilesV2`).then(response => {
if (response.redirects) {
cy.visit(domain);
cy.get('#login').click();
cy.get('#username').type(username);
cy.get('#password').type(password);
cy.get('#submit').click();
cy.getCookie(cookieName).then(c => {
cy.setCookie(cookieName, c.value, {
domain: 'localhost',
secure: false,
});
});
}
});
},
);
Additional Info (images, stack traces, etc)
home:4 Uncaught Error: Something went terribly wrong and we cannot proceed. We expected to find the global Cypress in the parent window but it is missing!. This should never happen and likely is a bug. Please open an issue! at home:4
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 20 (6 by maintainers)
I am sorry, but we cannot investigate an issue without a reproducible example. I welcome someone to create a new public repo with code showing the problem, or clone https://github.com/cypress-io/cypress-test-tiny or https://github.com/cypress-io/cypress-example-recipes to demonstrate it, then we can reconsider this issue.
This issue should not be closed, as it was never resolved. I suggest reopening the issue until it is resolved.
@kbaala88 you are commenting on an unrelated closed issue. Please open an issue with detailed description and reproducible steps we can run to see the problem.
window.Cypressis undefined when I runcypress run, if I runcypress openis working fine, in my case, I set thewindow.storeonly whenwindow.Cypressis defined and if I runcypress runall my tests crash becausewindow.storeis not set it.