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

Error: This socket has been ended by the other party #6458

Closed
estefafdez opened this issue Feb 14, 2020 · 60 comments · Fixed by #6945 or m87h/site#83
Closed

Error: This socket has been ended by the other party #6458

estefafdez opened this issue Feb 14, 2020 · 60 comments · Fixed by #6945 or m87h/site#83
Assignees
Labels
topic: EPIPE Hitting the EPIPE error when running tests

Comments

@estefafdez
Copy link

estefafdez commented Feb 14, 2020

Current behavior:

When I run my specs headless on the CLI, Cypress closed unexpectedly with a socket error.

Error code:

Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:407:14)
    at ClientRequest.<anonymous> (/Users/estefania.fernandez/Library/Caches/Cypress/4.0.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:203:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:575:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
    at TLSSocket.socketOnData (_http_client.js:449:22)
    at TLSSocket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at TLSSocket.Readable.push (_stream_readable.js:210:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17)
 {
  code: 'EPIPE'
}
Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:407:14)
    at ClientRequest.<anonymous> (/Users/{my.user}/Library/Caches/Cypress/4.0.1/Cypress.app/Contents/Resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:203:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:575:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
    at TLSSocket.socketOnData (_http_client.js:449:22)
    at TLSSocket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at TLSSocket.Readable.push (_stream_readable.js:210:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17)

The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: darwin (19.3.0)
Cypress Version: 4.0.1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ycbm/cypress-e2e@0.0.0 stag: `cypress run --env configFile=stag`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ycbm/cypress-e2e@0.0.0 stag script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users{myuser}//.npm/_logs/2020-02-14T08_51_09_625Z-debug.log

NPM Complete log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'stag' ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose run-script [ 'prestag', 'stag', 'poststag' ]
5 info lifecycle @ycbm/cypress-e2e@0.0.0~prestag: @ycbm/cypress-e2e@0.0.0
6 info lifecycle @ycbm/cypress-e2e@0.0.0~stag: @ycbm/cypress-e2e@0.0.0
7 verbose lifecycle @ycbm/cypress-e2e@0.0.0~stag: unsafe-perm in lifecycle true
8 verbose lifecycle @ycbm/cypress-e2e@0.0.0~stag: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Volumes/Seguridad/YCBM-GIT/ycbm-cypress/js/packages/cypress-e2e/node_modules/.bin:/usr/local/opt/gettext/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
9 verbose lifecycle @ycbm/cypress-e2e@0.0.0~stag: CWD: /Volumes/Seguridad/YCBM-GIT/ycbm-cypress/js/packages/cypress-e2e
10 silly lifecycle @ycbm/cypress-e2e@0.0.0~stag: Args: [ '-c', 'cypress run --env configFile=stag' ]
11 silly lifecycle @ycbm/cypress-e2e@0.0.0~stag: Returned: code: 1  signal: null
12 info lifecycle @ycbm/cypress-e2e@0.0.0~stag: Failed to exec stag script
13 verbose stack Error: @ycbm/cypress-e2e@0.0.0 stag: `cypress run --env configFile=stag`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @ycbm/cypress-e2e@0.0.0
15 verbose cwd /Volumes/Seguridad/YCBM-GIT/ycbm-cypress/js/packages/cypress-e2e
16 verbose Darwin 19.3.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "stag"
18 verbose node v10.16.3
19 verbose npm  v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error @ycbm/cypress-e2e@0.0.0 stag: `cypress run --env configFile=stag`
22 error Exit status 1
23 error Failed at the @ycbm/cypress-e2e@0.0.0 stag script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Desired behavior:

Cypress is not closed and I can run all my tests without any problem.

Test code to reproduce

I have 4 specs, all of them have the following structure:

/* global cy, before, Cypress */
const env = Cypress.env();

describe('PageName', function () {
	describe('PageName Checks', () => {
		before(() => {
			go to the page. 
		});

		it....
	});
	
	describe('PageName Actions', () => {
		beforeEach(() => {
                        go to the page and accept the cookies. 
		});

		it....
	});
});

My config file looks like:

{
    "env": {
        "appURL": "URL",
    }
}

Versions

Platform: darwin (19.3.0)
Cypress Version: 4.0.1
Electron 78 (headless)
Mac OS version: Catalina 10.15.3 (19D76).

@carlgordon
Copy link

carlgordon commented Feb 14, 2020

I am getting a similar error after installing 4.0.1

9 verbose lifecycle manager-web@0.0.0~e2e: CWD: C:\BuildAgents\Agent4\_work\8\s
10 silly lifecycle manager-web@0.0.0~e2e: Args: [ '/d /s /c', 'cypress run --browser chrome --headless' ]
11 silly lifecycle manager-web@0.0.0~e2e: Returned: code: 1  signal: null
12 info lifecycle manager-web@0.0.0~e2e: Failed to exec e2e script
13 verbose stack Error: manager-web@0.0.0 e2e: `cypress run --browser chrome --headless`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\devadmin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\devadmin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid manager-web@0.0.0
15 verbose cwd C:\BuildAgents\Agent4\_work\8\s
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\devadmin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "e2e"
18 verbose node v8.11.2
19 verbose npm  v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error manager-web@0.0.0 e2e: `cypress run --browser chrome --headless`
22 error Exit status 1
23 error Failed at the manager-web@0.0.0 e2e script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]`

Verifying Cypress can run C:\Users\devadmin\AppData\Local\Cypress\Cache\4.0.1\Cypress [started]
Verifying Cypress can run C:\Users\devadmin\AppData\Local\Cypress\Cache\4.0.1\Cypress [failed]
[?25hCypress verification timed out.

This command failed with the following output:

C:\Users\devadmin\AppData\Local\Cypress\Cache\4.0.1\Cypress\Cypress.exe --smoke-test --ping=834
Command timed out after 30000 milliseconds: C:\Users\devadmin\AppData\Local\Cypress\Cache\4.0.1\Cypress\Cypress.exe --smoke-test --ping=834
Platform: win32 (10.0.14393)
Cypress Version: 4.0.1
[?25hnpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! manager-web@0.0.0 e2e: `cypress run --browser chrome --headless`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the manager-web@0.0.0 e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\devadmin\AppData\Roaming\npm-cache\_logs\2020-02-13T17_16_28_664Z-debug.log
##[error]npm failed with error: C:\Program Files\nodejs\npm.cmd failed with return code: 1
##[section]Finishing: npm run e2e

@jennifer-shehane
Copy link
Member

@carlgordon Your output does not look related to the original issue. Your run failed at cypress verify step.

@estefafdez
Copy link
Author

estefafdez commented Feb 14, 2020

I think could be due to the before or beforeEach blocks before each describe block? it seems to fail every time on the same step. I had a different beforeEach on every block, is that a good practice?

@carlgordon
Copy link

Thanks @jennifer-shehane I didn't see that. Will try to debug the verification.

@jennifer-shehane
Copy link
Member

@estefafdez I'll need to know what you are doing in the before and beforeEach blocks if you believe this is related. Can you send over the Cypress tests you're running? Feel free to remove sensitive information.

@estefafdez
Copy link
Author

estefafdez commented Feb 18, 2020

Hello @jennifer-shehane , I don't think they are related (because I've been using them in the same way on the others specs), and none of them closes cypress. The problem is always on the same specs, let me copy/paste the code for you:

/* global cy, Cypress */

describe('Page1', function () {
	describe('Page1 Checks', () => {
        before(() => {
			cy.visit('URL');
		});

		it('[] should display the xx', function () {
            cy.get(element).should('be.visible');
		});

		it('[] should display the xx', function () {
			cy.get(element).should('be.visible');
		});

		it('[] should display the xx', function () {
            cy.get(element).should('be.visible');
		});

		it('[] should display the xx', function () {
			cy.get(element).should('be.visible');
		});

		it('[] should display the xx', function () {
            cy.get(element).should('be.visible');
		});

		it('[] should display the xx', function () {
			cy.get(element).should('be.visible');
		});

		it('[] should display the xx', function () {
            cy.get(element).should('be.visible');
		});

		it('[] should display the xx', function () {
			cy.get(element).should('be.visible');
		});
	});

	describe('Page1 Actions', () => {
		beforeEach(() => {
            cy.visit('URL');
			cy.get(acceptCookiesElement).click();
		});
	
		it('[] should see the xxx after click on xxx button', function () {
			cy.get(element).click();
			cy.get(element).should('be.visible');
		});
--------------------------> CYPRESS CLOSES HERE.	
		it('[] should go to xxx after click on xxx', function () {
			cy.get(element).click();
			cy.url().should('eq', 'URL');
		});

		it('[] should go to xxx after click on xxx', function () {
			cy.get(element).click();
			cy.url().should('eq', 'URL');
		});

		it('[] should go to xxx after click on xxx', function () {
			cy.get(element).click();
			cy.url().should('eq', 'URL');
		});

		it('[] should go to xxx after click on xxx', function () {
			cy.get(element).click();
			cy.url().should('eq', 'URL');
		});

		it('[] should go to xxx after click on xxx', function () {
			cy.get(element).click();
			cy.url().should('eq', 'URL');
		});

		it('[] should go to xxx after click on xxx', function () {
			cy.get(element).click();
			cy.url().should('eq', 'URL');
		});

		it('[] should go to xxx after click on xxx', function () {
			cy.get(element).click();
			cy.url().should('eq', 'URL');
		});
	});
});

I hope this could help you find the problem. Thanks!

@BiosBoy
Copy link

BiosBoy commented Feb 18, 2020

Any great deas here? I hit this issue too...

@estefafdez
Copy link
Author

No ideas on my part. I remove the before and beforeAll hooks from the tests and I'm still facing the issue sometimes mostly on Electron and on Chrome (not on Firefox or Edge). I even try with Cypress 4.0.2 and nothing :( any ideas please? thanks

@CoryDanielson
Copy link
Contributor

CoryDanielson commented Feb 20, 2020

Do you see any failed requests related to socket.io in your terminal? The same terminal window that you used to run Cypress.

I specifically saw a 401 (Unauthorized) request like this before Cypress crashed. There were lots of other 401 and 403 requests, too

GET /socket.io/?EIO=3&transport=polling&t=N1PN5CM 401 199.404 ms - -

#5787 (comment)

@estefafdez
Copy link
Author

No, I didn't see any request like that on my terminal.

@YemiYuma
Copy link

YemiYuma commented Feb 21, 2020

Was going to open a new issue, but this one exists so I'll post here.

Has anyone managed to resolve this problem? Suddenly started happening to me after upgrading to 4.0.1 in both Chrome & Electron - occurs running with both cypress open or cypress run, doesn't help upgrading to 4.0.2 either.

It seems to run the first test in my spec.js file, and consistently fails with the error message shown below. In the beforeEach method for each of my tests is simply a cy.visit('').

I can provide more information if need be.

Currently attempting to downgrade Cypress to the previous version to see if this error persists - Happens even downgrading to 3.8.3

Some more information:
Happens on both Electron 58 & Chrome 60 - running in a container on Jenkins or locally through npx cypress open/run
Platform: darwin (18.7.0)
Cypress Version: 4.0.2

Error message

Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:407:14)
    at ClientRequest.<anonymous> (/Users/xxx/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:203:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:575:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
    at TLSSocket.socketOnData (_http_client.js:449:22)
    at TLSSocket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at TLSSocket.Readable.push (_stream_readable.js:210:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17)
 {
  code: 'EPIPE'
}
Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:407:14)
    at ClientRequest.<anonymous> (/Users/xxx/Library/Caches/Cypress/4.0.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:203:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:575:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
    at TLSSocket.socketOnData (_http_client.js:449:22)
    at TLSSocket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at TLSSocket.Readable.push (_stream_readable.js:210:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17)

The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

@estefafdez
Copy link
Author

@YemiYuma my before and beforeEach methods were exactly the same, cy.visit().

Thanks for your comment and for your information, let's hope they can fix it :)

@BiosBoy
Copy link

BiosBoy commented Feb 22, 2020

Well, in my case, the crash is going because of constantly broken WebSockets requests during a particular test, like 10-20 in the row. Anyway, I guess Cypress should handle that in some ways, at least by try > catch?

@Havrisone
Copy link

Getting exactly the same error on 3.8.2
This seems to happen with any test, no specific repro steps found so far

@estefafdez
Copy link
Author

exactly. @BiosBoy I think it should handle this in someway.

@bencatjakub
Copy link

We experience the same thing. And again no steps to reproduce, it happens "randomly" for us. Usually on long test runs though.

Please prioritize this for solving, thanks.

Cypress 3.8.2
Chrome 79

@estefafdez
Copy link
Author

agreed with @bencatjakub , long runs activate it somehow, but my longest spec is 20 tests long :( please help!

@flotwig flotwig self-assigned this Feb 24, 2020
@mowli
Copy link

mowli commented Feb 25, 2020

We are experiencing the same thing, but in our case the crash is immediate. No Specs are executed

yarn run v1.22.0

$ yarn cypress:rails:start && yarn cypress:rails:wait && cypress run --project ./spec && yarn cypress:rails:kill

$ bin/rails s -e test -p 5002 --pid tmp/pids/cypress-rails.pid &

$ while ! curl --output /dev/null --silent --fail --head http://localhost:5002 ; do sleep 1 ; done

=> Booting Puma

=> Rails 5.2.2.1 application starting in test 

=> Run `rails server -h` for more startup options

Puma starting in single mode...

* Version 3.12.2 (ruby 2.6.5-p114), codename: Llamas in Pajamas

* Min threads: 5, max threads: 5

* Environment: test

* Listening on tcp://0.0.0.0:5002

Use Ctrl-C to stop

The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: linux (Ubuntu Linux - 18.04)

Cypress Version: 3.8.2

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The command "yarn cypress:run" exited with 1.
cache.2

store build cache

@estefafdez
Copy link
Author

@mowli you are using cypress 3.8.2, could you update to the latest version (4.0.2) and have a look?

@mowli
Copy link

mowli commented Feb 25, 2020

@estefafdez Ok, that did the trick for me! Could have tried that before 🤦‍♂

@estefafdez
Copy link
Author

happy to help @mowli. Could you have a look at your specs with that version and see if you get the same error than us and could provide more information to the cypress devs to help with this problem? thanks :)

@bencatjakub
Copy link

We updated our Cypress from 3.8.2 to 4.0.2, with no change. Test run still randomly fails on the same error.

@estefafdez
Copy link
Author

same error right @bencatjakub?

@bencatjakub
Copy link

@estefafdez yup

Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:407:14)
    at ClientRequest.<anonymous> (/var/lib/jenkins/.cache/Cypress/4.0.2/Cypress/resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:203:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:575:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
    at TLSSocket.socketOnData (_http_client.js:449:22)
    at TLSSocket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at TLSSocket.Readable.push (_stream_readable.js:210:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17)
 {
  code: 'EPIPE'
}
Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:407:14)
    at ClientRequest.<anonymous> (/var/lib/jenkins/.cache/Cypress/4.0.2/Cypress/resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:203:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:575:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
    at TLSSocket.socketOnData (_http_client.js:449:22)
    at TLSSocket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at TLSSocket.Readable.push (_stream_readable.js:210:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17)

@flotwig
Copy link
Contributor

flotwig commented Feb 25, 2020

I believe the root cause of this error is that, for a short amount of time, there is no error handler on the underlying socket for websocket connections that are proxied through Cypress. An error handler is only attached after the proxy request is successfully upgraded: https://github.com/http-party/node-http-proxy/blob/9bbe486c5efcc356fb4d189ef38eee275bbde345/lib/http-proxy/passes/ws-incoming.js#L120-L133

So, if the other end of the websocket disappears unexpectedly this uncaught error event on the browser socket can cause a crash.

However, I haven't been able to reproduce this locally. Can someone share an example repository that shows this error?

@uweku
Copy link

uweku commented Mar 5, 2020

@uweku

I don't know why, but resetting config parameter
"numTestsKeptInMemory": 10
did the trick, in my case. Neither removing Cypress nor switching the version helped, but removing this parameter seems to avoid such issues.

Is there a difference between removing this "numTestsKeptInMemory": 10 and just changing the value to 0 "numTestsKeptInMemory": 0?

@bencatjakub Right now, removing this option helped in some cases, but unfortunately not in all cases. Right now, the tests fail again, even when the stting is not present or "0". So I'm back to the beginning right now.

@bencatjakub
Copy link

Any updates on this guys? Anybody from Cypress.io to have some official statement?

This is a blocker for some portion of our Cypress tests and we do not have stable results because of this.

PLEASE PRIORITIZE THIS!!!

@BiosBoy

This comment has been minimized.

@jennifer-shehane
Copy link
Member

@uweku You can email support@cypress.io to send any potentially sensitive info when providing a reproducible example.

@uweku
Copy link

uweku commented Mar 18, 2020

@uweku You can email support@cypress.io to send any potentially sensitive info when providing a reproducible example.

Sure, I sent you the test case

@uweku
Copy link

uweku commented Mar 19, 2020

@jennifer-shehane I wonder if you received it and were you able to run it?

@TheWanderingWalnut
Copy link

TheWanderingWalnut commented Mar 25, 2020

I've also been experiencing this today, both on Cypress v4.2.0 and 4.1.0. I can no longer get through an entire test run (65 tests, ~30m locally on a MacBook) without Cypress crashing. Below is the output from Cypress when it's crashed, both on 4.1.0 and 4.2.0.

4.1.0:

    ✓ Logs in as a staff account (37088ms)
    (retry 1/1) Logs in as a partner
    ✓ Logs in as a partner (4140ms)
    ✓ logs in with an email (4651ms)
Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:407:14)
    at ClientRequest.<anonymous> (/Users/andrewgraves/Library/Caches/Cypress/4.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:203:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:575:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
    at TLSSocket.socketOnData (_http_client.js:449:22)
    at TLSSocket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at TLSSocket.Readable.push (_stream_readable.js:210:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17)
 {
  code: 'EPIPE'
}
Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:407:14)
    at ClientRequest.<anonymous> (/Users/andrewgraves/Library/Caches/Cypress/4.1.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:203:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:575:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
    at TLSSocket.socketOnData (_http_client.js:449:22)
    at TLSSocket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at TLSSocket.Readable.push (_stream_readable.js:210:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17)

The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: darwin (19.3.0)
Cypress Version: 4.1.0
error Command failed with exit code 1.





4.2.0:
```Creates Items
Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:441:14)
    at ClientRequest.<anonymous> (/Users/andrewgraves/Library/Caches/Cypress/4.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:210:5)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:583:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:115:17)
    at TLSSocket.socketOnData (_http_client.js:456:22)
    at TLSSocket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:308:12)
    at readableAddChunk (_stream_readable.js:289:11)
    at TLSSocket.Readable.push (_stream_readable.js:223:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:182:23)
 {
  code: 'EPIPE'
}
Error: This socket has been ended by the other party
    at TLSSocket.writeAfterFIN [as write] (net.js:441:14)
    at ClientRequest.<anonymous> (/Users/andrewgraves/Library/Caches/Cypress/4.2.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:115:16)
    at ClientRequest.emit (events.js:210:5)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:583:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:115:17)
    at TLSSocket.socketOnData (_http_client.js:456:22)
    at TLSSocket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:308:12)
    at readableAddChunk (_stream_readable.js:289:11)
    at TLSSocket.Readable.push (_stream_readable.js:223:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:182:23)
The Test Runner unexpectedly exited via a exit event with signal SIGSEGV
Please search Cypress documentation for possible solutions:
https://on.cypress.io
Check if there is a GitHub issue describing this crash:
https://github.com/cypress-io/cypress/issues
Consider opening a new issue.
----------
Platform: darwin (19.3.0)
Cypress Version: 4.2.0
error Command failed with exit code 1.

@BiosBoy
Copy link

BiosBoy commented Mar 28, 2020

Seems like we're left alone here? :(

@TheWanderingWalnut
Copy link

@BiosBoy Yeah, unfortunately it seems Cypress is uninterested in fixing their application unless their users do all the legwork... -__-

@flotwig
Copy link
Contributor

flotwig commented Mar 30, 2020

@uweku Hmm, I cannot find any incoming email from you in our support inbox from the relevant dates, containing this issue number, or from your name. Can you email it to me directly by using the email address on my GitHub profile? Thanks!


@TheWanderingWalnut Actually, I spent a day trying to reproduce this issue by playing with websockets, but was unable to get the same error y'all are experiencing. Real world apps can have a lot of complexity that can cause issues that are very very difficult to isolate by shooting in the dark. Until someone can supply a reproducible example to debug with, or until someone else finds the problem and opens a PR to fix it, there is no way that progress can be made on this issue. I hope this situation is understandable.

@TheWanderingWalnut
Copy link

TheWanderingWalnut commented Mar 30, 2020

@flotwig Thank you for letting us know, I find the lack of communication from Cypress on here leads to many misunderstandings, given the last official post was 12 days ago in this thread, despite crashes being a critical issue.

I am seeing this extremely consistently now, is there any more useful information I could get you from my setup, perhaps?

I suspect no one will be able to provide a fully-reproducible example, as this happens seemingly at random while running tests, and on a wide variety of Cypress versions. Cypress can crash anywhere from about the third test, to about the 40th one or so, I can no longer get farther than about 40 tests before it's doomed to crash.

Please let me know if I can provide you with anything else to support your investigation, I'm happy to take time and work through it, since a completely reproducible example is extremely unlikely in this case.

@uweku
Copy link

uweku commented Apr 1, 2020

@uweku Hmm, I cannot find any incoming email from you in our support inbox from the relevant dates, containing this issue number, or from your name. Can you email it to me directly by using the email address on my GitHub profile? Thanks!

@TheWanderingWalnut Actually, I spent a day trying to reproduce this issue by playing with websockets, but was unable to get the same error y'all are experiencing. Real world apps can have a lot of complexity that can cause issues that are very very difficult to isolate by shooting in the dark. Until someone can supply a reproducible example to debug with, or until someone else finds the problem and opens a PR to fix it, there is no way that progress can be made on this issue. I hope this situation is understandable.

Done :-)

@melibe23
Copy link

melibe23 commented Apr 3, 2020

Having the same issue :( Is blocking me 100%

@estefafdez
Copy link
Author

I'm still having it with cypress 4.3.0 with all the browsers: electron, chrome, firefox and edge, even using github and the new actions, please help :(

@flotwig
Copy link
Contributor

flotwig commented Apr 3, 2020

The repro shared by @uweku doesn't seem to exhibit the issue on the latest Cypress, so this is once again blocked by the need for a reproducible example.

@melibe23 @estefafdez if either of you could share an example repo that showcases this issue, that would be a huge help.

@estefafdez
Copy link
Author

I send you an email @flotwig!

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 6, 2020

The code for this is done in cypress-io/cypress#6945, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Apr 6, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 13, 2020

Released in 4.4.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.4.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Apr 13, 2020
@bahmutov bahmutov added the topic: EPIPE Hitting the EPIPE error when running tests label Sep 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: EPIPE Hitting the EPIPE error when running tests
Projects
None yet