Skip to content
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

This socket has been ended by the other party #17288

Open
cardil opened this issue Jul 12, 2021 · 5 comments
Open

This socket has been ended by the other party #17288

cardil opened this issue Jul 12, 2021 · 5 comments
Labels
E2E Issue related to end-to-end testing existing workaround Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.

Comments

@cardil
Copy link

cardil commented Jul 12, 2021

Current behavior

We are experiencing the following error:

Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:456:14)
    at ClientRequest.<anonymous> (/home/jenkins/.cache/Cypress/7.5.0/Cypress/resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:315:20)
    at HTTPParser.parserOnIncomingClient (_http_client.js:641:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
    at TLSSocket.socketOnData (_http_client.js:509:22)
    at TLSSocket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:284:9)
    at TLSSocket.Readable.push (_stream_readable.js:223:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
 {
  code: 'EPIPE'
}
Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:456:14)
    at ClientRequest.<anonymous> (/home/jenkins/.cache/Cypress/7.5.0/Cypress/resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:315:20)
    at HTTPParser.parserOnIncomingClient (_http_client.js:641:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
    at TLSSocket.socketOnData (_http_client.js:509:22)
    at TLSSocket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:284:9)
    at TLSSocket.Readable.push (_stream_readable.js:223:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

This stack trace is from Cypress 7.5.0, but updating it to latest 7.7.0 doesn't solve the issue.

The following link captures recent CI builds that are affected: search.ci.openshift.org ws-incoming.js:115:16 in serverless-operator

This bug report is almost identical #5787 and #6458 which both were "addressed" in #6945 and released in Cypress 4.4.0.

I think that solution isn't the proper one.

Desired behavior

I'm convinced that the solution that was applied in cypress-io/node-http-proxy@9322b4b doesn't cover all possible cases.

I did try using the @caosm solution from this comment http-party/node-http-proxy#1342 (comment), and it helped (caosm/node-http-proxy@46d02be). After applying this patch, I don't see EPIPE errors anymore.

Test code to reproduce

This problem is flaky. I can't provide other evidence than our CI search engine, here: search.ci.openshift.org ws-incoming.js:115:16 in serverless-operator

I could provide instructions to run our test suite - the following error should emerge after a couple of runs (especially on small VMs, maybe not connected?!?)

Cypress Version

7.7.0

Other

No response

cardil added a commit to cardil/serverless-operator that referenced this issue Jul 13, 2021
cardil added a commit to cardil/serverless-operator that referenced this issue Jul 13, 2021
openshift-merge-robot pushed a commit to openshift-knative/serverless-operator that referenced this issue Jul 13, 2021
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/serverless-operator that referenced this issue Jul 13, 2021
openshift-merge-robot pushed a commit to openshift-knative/serverless-operator that referenced this issue Jul 13, 2021
Co-authored-by: Chris Suszyński <ksuszyns@redhat.com>
@pbadenski
Copy link

Does anyone perhaps have any more colour on this?

I'm experiencing similar issue with similar looking stack trace on 8.2.0.

@cardil
Copy link
Author

cardil commented Feb 23, 2022

As far as I know, this still isn't fixed yet. There's an open PR that should fix it cypress-io/node-http-proxy#1, but that needs some work.

Meanwhile, we are running this work around: openshift-knative/serverless-operator#1101 so you could do similar in your project.

@KittyGiraudel
Copy link
Contributor

This workaround no longer works in Cypress v10. It throws with the following error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tasks/state' is not defined by "exports" in /projectname/node_modules/cypress/package.json

@Aishwarya-U-R
Copy link

Able to solve this by updating below reference in apply-patches.js - from Cy 10 onwards.

const { getVersionDir } = require("../node_modules/cypress/lib/tasks/state");

@nagash77 nagash77 added existing workaround E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. labels May 4, 2023
@nanek
Copy link

nanek commented Jan 11, 2024

Noting here for visibility, that I was experiencing this issue all the time and after manually applying the patch provided in cypress-io/node-http-proxy#1 (comment) (from July 2021 👀 ) it fixed this issue completely for my team. Cypress now reliably runs every time in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing existing workaround Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants