-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[7.0.1]Bug: cy.intercept POST terminates cypress process #15901
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
Comments
Interesting, confirmed it crashes. Also, it crashes when the page posts
but does not crash if we post JSON.stringify({first: 'hello'}) |
Works in 6.8.0, crashes in v7 |
cy.intercept
POST terminates cypress processcy.intercept
response stub with unicode body terminates cypress process
cy.intercept
response stub with unicode body terminates cypress process
Just to confirm, I also have this issue on Ubuntu 18.04 in Edit: using Latin (english) characters |
I don't think the Chinese characters are relevant. I observed the same problem when making a HTTP POST containing only Latin (English) characters. The problem occurs after upgrading from 6.8.0 to 7.0.1. I've described the problem in a bit more detail on Stackoverflow |
Comparing the debug messages during crash vs non-crash Crash
Notice the No crash
Notice the same message with Running with debug logs |
Digging under the hood, we decide to treat the crashing JSON object as binary, which breaks the request. If we treat the posted
which has a nice open issue with exactly our scenario bevry/istextorbinary#13 |
I was running into this issue in v7.0.1 while |
It's a shame Getting same issue when trying to spy on a |
@johnnyperkins |
The code for this is done in cypress-io/cypress#15946, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Simplified reproduction
https://github.com/bahmutov/cypress-15901-bug
Current behavior
presettings
cy.intercept
in the test with the API aboveResult
If I run Cypress, it's process is terminated with error messages
Desired behavior
Cypress test process must not be terminated.
Test code to reproduce
https://github.com/njh7799/cypress7.0-intercept-post-bug
Versions
Cypress version: 7.0.1
OS: MAC Big Sir
The text was updated successfully, but these errors were encountered: