-
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
Cypress crashes with "Error: This socket has been ended by the other party" at unpredictable times #27552
Comments
Confirming this behavior (I'm on the same team @nickgrout). A few additional things I can add in the hopes they are useful:
and
these lines are from the a cypress run that eventually crashed, but appear long before the fatal error pops up
from my perspective, the biggest immediate problem is that we don't have more information about the error: as far as we're able to decipher (maybe you'll have more luck with the debug logs!) it's not tracing back to anything in our test code or in cypress; it's just printing an internal node stacktrace and then dying. there very well may be something happening on our end that is triggering the crash -- but we currently don't have enough information to figure out what that is. at minimum, cypress should probably fail more gracefully / with more info in this scenario (whatever the scenario turns out to be) and ideally, it'd be able to recover. |
Hi @nickgrout and @joshkaplan , this is related to a POC you all are doing at the moment correct? I have passed this along to our support team who will be reaching out to help you narrow down this issue into something that is a bit easier for us to investigate. At the moment the only thing that is standing out for me is I see two different domains in the logs |
sounds great thanks!
not directly related -- these are crashes that started happening on a project that has been in use for a ~year or more. (but yes we are currently running a POC evaluating Cypress Cloud -- and these crashes do make cypress unusable for this project)
Yes, i believe these tests are visiting multiple domains. The domains and apps are not public, so we have redacted some info. As @nickgrout mentioned above, we can share un-redacted logs in a non-public channel if that's helpful |
One quick additional note: we may have narrowed down the crash to coming from We're currently confirming if changing our use of |
Updates
So, it's mitigated for now -- but would still like to better understand going forward exactly what triggered the crash, and why |
We are also experiencing this issue mainly in our Devops Pipelines, but not all the time. @joshkaplan could you explain or show what you mean by adjusting/narrowing the |
@lambertsj sure! we had a very broad cy.intercept(VERY_BROAD_REGEX, (req) => {
// a callback to modify the req headers for auth purposes
}); this was matching a lot of requests, including very large assets (e.g. JS, CSS) requests. we removed this intercept, and did auth using a different mechanism. that mitigated the issue, although we still don't fully understand exactly why / what the specific problem was. |
Do we have any findings on this, as this issue is still there where cypress tests fail with this error- |
@akshaygupta5233 I've had success with cypress-io/node-http-proxy#1 (comment) |
HI @nanek . Please help me with how you did that, I am unable to perform the same and follow the steps! |
@akshaygupta5233 I copied the entire file, ws-incoming.js, from the PR into my repo at cypress/patches/ws-incoming.js. Cypress will install itself somewhere depending on the operating system and cypress config. In my case I am using github actions, and I've set You will need to adjust these paths as needed for your system. Good luck! |
Hi @nanek I followed the same steps like you said. But still experiencing the same issue. I have hundreds of Test cases to run, and each flow is some 8 to 9 minutes long. |
This is still an issue so I went ahead and made a PR to the main Cypress repository to validate the proposed fix doesn't break existing proxy workflows here: #29453 |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
Since about July 19th my team has been experiencing a bug with cypress which causes cypress to crash at unpredictable moments when tested on one of our applications. The crash happens as frequently as every 2 minutes of cypress running, or can be as long as >1hr of cypress running.
Version info:
Several members of my team and I have tried to isolate the cause, or even identify specific steps to reproduce but have been unable to get any closer than "run the tests and wait".
We think the timing of this bug may coincide with a chrome version update, but are not sure.
here is a redacted log around the time of the failure, with
DEBUG=cypress:*
turned on. I can share the un-redacted version of the logs directly with cypress maintainers.Here is just the error (excerpt from full logs above). The stack trace points to node internals, but it's not clear where it's being called from cypress.
Desired behavior
Cypress should be stable and not crash.
Test code to reproduce
TBD - currently the only way we can reproduce is by running our tests for an average of 5 minutes on a specific app.
Cypress Version
12.9.0
Node version
16.16.0
Operating System
macOS 13.5
Debug Logs
Other
I am hoping that someone from the cypress development community can take a look at the logs here and help us isolate the failure further, or propose potential root causes.
The text was updated successfully, but these errors were encountered: