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
Cannot read property '__error' of null #7518
Comments
Same, tests that never had this now have it appearing all over the place. Cypress says it originates from our app but it doesnt seem like it is, or if it is its not appearing in a console anywhere. |
Struggled with this as well and the issue seems to with I'll put up a repro in the next hour but for now, the following should be a good workaround: it('my test', () => {
cy.on('uncaught:exception', err => {
return !err.message.includes(`Cannot read property '__error' of null`);
});
// my test code ...
}); EDIT: I ruled out the simplest case when I was attempting to repro this. The demo project is here: https://github.com/FLGMwt/cypress-null-response-regression I'm not yet sure what's different about my application code that returns null and this demo server that returns null, but I do hope this is a start. I'll give a little time to repro-ing tomorrow, but hope this helps |
Thanks for providing a reproducible example! I can recreate this and see this was introduced in Cypress 4.6.0. I suspect this is related to our error improvements #3930 I also see these files were converted from coffeescript in the 4.6.0 release in #7227
it('Business Unit Test', () => {
cy.request('POST', 'https://qa1-cypress.st.dev/Auth/Login', { username: 'cydemoadmin', password: 'Test1@#$%' })
cy.visit('https://qa1-cypress.st.dev/#/Settings/business-units')
cy.get('.foobar')
}) 4.5.04.6.0Stack traceThis is throwing from this line of code, where the In the example, there is a request to
|
The code for this is done in cypress-io/cypress#7534, but has yet to be released. |
@jennifer-shehane is this going to be released as a hotfix (in a day or two) ? or will it be released according to the normal release schedule (every two weeks if i remember correctly) ? |
This will be released in our normal release schedule next Monday. You can downgrade to Cypress 4.5.0 in the meantime so it's not blocking. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
As of version 4.6.0, Cypress has been throwing this exception during a very simple test that consists of
This issue is reproducible with 4.7.0 version as well. It works perfectly fine in version 4.5.0.
Here's how to reproduce
Here's a screenshot of the exception stack trace

The text was updated successfully, but these errors were encountered: