Saw this error on AppVeyor Windows CI https://ci.appveyor.com/project/cypress-io/cypress-example-todomvc/build/1.0.169
events.js:167
throw er; // Unhandled 'error' event
^
Error: shutdown EPIPE
at ReadStream.Socket._final (net.js:369:25)
at callFinal (_stream_writable.js:615:10)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at ReadStream.onerror (_stream_readable.js:693:12)
at ReadStream.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ cypress:run: `cypress run`
Maybe
Need to debug with DEBUG=cypress:*
to isolate the problem
With debug output the last messages are
cypress:server:run final results of all runs: ...
cypress:server:cypress about to exit with code 0 +93ms
events.js:167
throw er; // Unhandled 'error' event
^
Error: shutdown EPIPE
at ReadStream.Socket._final (net.js:369:25)
at callFinal (_stream_writable.js:615:10)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at ReadStream.onerror (_stream_readable.js:693:12)
at ReadStream.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ cypress:run: `cypress run`
Right so this is with shutting everything down but unfortunately it doesn't really tell us where the problem is... you'll need to run some experiments... for instance create a test that visits a site that creates a long XHR request that is not responded to by the server.
The test will instantly pass and cypress will shut down the browser + server and exit. Does the error happen? If so then it's due to a request in flight.
It could also be due to the CLI piping / massaging the stdout / stderr
streams. That would be interesting.
Try to reproduce this without involving the network at all. Just have it run a tiny test without doing cy.visit()
or anything. I'm pretty sure those already work since we've had two releases that have gone by and cypress-test-tiny
and the example repos all pass on Windows
yeah, let me run the experiment with a single dummy test, then cy.visit
Hmm, found an interesting thing - there is an error from bundling step @chrisbreiding
Notice cypress\integration\integration\app_spec.js
part (double "integration")
cypress:server:controllers:spec send C:\Users\appveyor\AppData\Roaming\Cypress\cy\production\projects\cypress-example-todomvc-31c529e7c99c2a4beb3947eb6590b09f\bundles\cypress\integration\app_spec.js +1s
cypress:browserify errored bundling C:\Users\appveyor\AppData\Roaming\Cypress\cy\production\projects\cypress-example-todomvc-31c529e7c99c2a4beb3947eb6590b09f\bundles\cypress\integration\integration\app_spec.js { Error: Cannot find module 'C:\projects\cypress-example-todomvc\cypress\integration\integration\app_spec.js' from 'C:\projects\cypress-example-todomvc'
at C:\Users\appveyor\AppData\Local\Cypress\Cache\3.0.1\Cypress\resources\app\packages\server\node_modules\browser-resolve\node_modules\resolve\lib\async.js:55:21
at load (C:\Users\appveyor\AppData\Local\Cypress\Cache\3.0.1\Cypress\resources\app\packages\server\node_modules\browser-resolve\node_modules\resolve\lib\async.js:69:43)
at onex (C:\Users\appveyor\AppData\Local\Cypress\Cache\3.0.1\Cypress\resources\app\packages\server\node_modules\browser-resolve\node_modules\resolve\lib\async.js:92:31)
at C:\Users\appveyor\AppData\Local\Cypress\Cache\3.0.1\Cypress\resources\app\packages\server\node_modules\browser-resolve\node_modules\resolve\lib\async.js:22:47
at C:\Users\appveyor\AppData\Local\Cypress\Cache\3.0.1\Cypress\resources\app\packages\server\node_modules\graceful-fs\polyfills.js:284:29
at FSReqWrap.oncomplete (fs.js:152:21)
stream:
Labeled {
_readableState:
ReadableState {
objectMode: true,
highWaterMark: 16,
buffer: BufferList { length: 0 },
length: 0,
pipes: [Object],
pipesCount: 1,
flowing: true,
ended: false,
endEmitted: false,
reading: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: true,
domain: null,
_events:
{ end: [Array],
error: [Function],
data: [Function: ondata],
_mutate: [Object] },
_eventsCount: 4,
_maxListeners: undefined,
_writableState:
WritableState {
objectMode: true,
highWaterMark: 16,
finalCalled: false,
needDrain: false,
ending: true,
ended: true,
finished: true,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: true,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object] },
writable: false,
allowHalfOpen: true,
_options: { objectMode: true },
_wrapOptions: { objectMode: true },
_streams: [ [Object] ],
length: 1,
label: 'deps' },
filePath: 'C:\\projects\\cypress-example-todomvc\\cypress\\integration\\integration\\app_spec.js',
originalStack: 'Error: Cannot find module \'C:\\projects\\cypress-example-todomvc\\cypress\\integration\\integration\\app_spec.js\' from \'C:\\projects\\cypress-example-todomvc\'\n at C:\\Users\\appveyor\\AppData\\Local\\Cypress\\Cache\\3.0.1\\Cypress\\resources\\app\\packages\\server\\node_modules\\browser-resolve\\node_modules\\resolve\\lib\\async.js:55:21\n at load (C:\\Users\\appveyor\\AppData\\Local\\Cypress\\Cache\\3.0.1\\Cypress\\resources\\app\\packages\\server\\node_modules\\browser-resolve\\node_modules\\resolve\\lib\\async.js:69:43)\n at onex (C:\\Users\\appveyor\\AppData\\Local\\Cypress\\Cache\\3.0.1\\Cypress\\resources\\app\\packages\\server\\node_modules\\browser-resolve\\node_modules\\resolve\\lib\\async.js:92:31)\n at C:\\Users\\appveyor\\AppData\\Local\\Cypress\\Cache\\3.0.1\\Cypress\\resources\\app\\packages\\server\\node_modules\\browser-resolve\\node_modules\\resolve\\lib\\async.js:22:47\n at C:\\Users\\appveyor\\AppData\\Local\\Cypress\\Cache\\3.0.1\\Cypress\\resources\\app\\packages\\server\\node_modules\\graceful-fs\\polyfills.js:284:29\n at FSReqWrap.oncomplete (fs.js:152:21)\n' } +15ms
cypress:browserify finished bundling C:\Users\appveyor\AppData\Roaming\Cypress\cy\production\projects\cypress-example-todomvc-31c529e7c99c2a4beb3947eb6590b09f\bundles\cypress\support\index.js +63ms
Same error was also in other failed build runs, just lost in all other noise.
I saw this the other day... it's worrysome because it means that that error did not bubble up correctly and cause Cypress to exit with a 1
status code. There are lots of e2e tests around this behavior so something about the way this crashed is not being tested.
Yeah, I encountered this same issue today after going to 3.0.1. The tests all passed, but the build fails due to this issue.
Another Stack trace from TeamCity running on Windows. I simply updated Cypress (and restarted server for good measure). Same tests were running flawlessly until the update.
events.js:160
[10:36:36][Step 2/2] throw er; // Unhandled 'error' event
[10:36:36][Step 2/2] ^
[10:36:36][Step 2/2]
[10:36:36][Step 2/2] Error: shutdown EPIPE
[10:36:36][Step 2/2] at exports._errnoException (util.js:1018:11)
[10:36:36][Step 2/2] at Socket.onSocketFinish (net.js:237:26)
[10:36:36][Step 2/2] at emitNone (events.js:91:20)
[10:36:36][Step 2/2] at Socket.emit (events.js:185:7)
[10:36:36][Step 2/2] at finishMaybe (_stream_writable.js:515:14)
[10:36:36][Step 2/2] at endWritable (_stream_writable.js:525:3)
[10:36:36][Step 2/2] at Socket.Writable.end (_stream_writable.js:490:5)
[10:36:36][Step 2/2] at Socket.end (net.js:431:31)
[10:36:36][Step 2/2] at Socket.onend (_stream_readable.js:511:10)
[10:36:36][Step 2/2] at Socket.g (events.js:291:16)
[10:36:36][Step 2/2] at emitNone (events.js:91:20)
[10:36:36][Step 2/2] at Socket.emit (events.js:185:7)
[10:36:36][Step 2/2] at endReadableNT (_stream_readable.js:974:12)
[10:36:36][Step 2/2] at _combinedTickCallback (internal/process/next_tick.js:80:11)
[10:36:36][Step 2/2] at process._tickCallback (internal/process/next_tick.js:104:9)
Cypress 3.0.1
windows 10,
Node 10.3
(The issue is not reproducable with node 8)
We're seeing it on 3.0.1 on Server 2012 with Node 8.11.2
Couldn't reproduce it with Node 8.11.2
Seeing this on 3.0.1
Windows 10
Node 10.1
This is likely with the CLI now piping the stdio
of the binary in Windows, and is likely not a problem with the binary itself.
The binary ships with its own node version, so whatever one you have locally installed does not affect the binary. However the CLI does run in your own node version, so if by changing the node version it fixes the problem, then that would be the root cause.
Can someone work with the CLI regarding piping stdio and see if they can see the root cause? We are still trying to reproduce on our end to even begin debugging this.
How to reproduce:
Windows 10, with node 10 installed, (also yarn 1.7)
mkdir cypress-test && cd cpress-test
yarn init
yarn add --dev cypress
yarn cypress open # this scaffolds and adds example files
yarn cypress run
Got the same error on Windows on node version 8! Running tests with cypress open
works fine. I use cypress-cucumber-preprocessor.
events.js:183
throw er; // Unhandled 'error' event
^
Error: shutdown EPIPE
at _errnoException (util.js:1022:11)
at Socket.onSocketFinish (net.js:307:25)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at finishMaybe (_stream_writable.js:614:14)
at endWritable (_stream_writable.js:622:3)
at Socket.Writable.end (_stream_writable.js:573:5)
at Socket.end (net.js:509:31)
at Socket.onend (_stream_readable.js:595:10)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] cypress:run: `cypress run`
npm ERR! Exit status 1
Angular CLI: 6.0.5
Node: 8.11.1
OS: win32 x64
Angular: 6.0.3
cypress:server:cypress about to exit with code 0 +17s
events.js:167
throw er; // Unhandled 'error' event
^
Error: shutdown EPIPE
at ReadStream.Socket._final (net.js:366:25)
at callFinal (_stream_writable.js:612:10)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at ReadStream.onerror (_stream_readable.js:687:12)
at ReadStream.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] cypress:run: `cypress run`
npm ERR! Exit status 1
Any workarounds for this at the moment? I'm seeing this issue in my VSTS pipeline when performing a cypress run. Works fine on the box directly but when part of a pipeline it blows up
I am seeing this error also on my jenkins run. I did just install cypress brand new globally because it was installing and unzipping every time, which was taking 5 minutes. Perhaps this newer version broke something or more likely I did something wrong. ha ha
I downgraded go cypress 2.1 and it ran on vsts!
Den ons 13 juni 2018 18:07maccurt notifications@github.com skrev:
I am seeing this error also on my jenkins run. I did just install cypress
brand new globally because it was installing and unzipping every time,
which was taking 5 minutes. Perhaps this newer version broke something or
more likely I did something wrong. ha ha—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/cypress-io/cypress/issues/1841#issuecomment-396994881,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABgKZ8DPuRezC6MKyl0TqKXFen4svrPzks5t8TjJgaJpZM4UVcyf
.
I also downgraded to 2.1 and it worked for me.
The bug disappeared with node 10.4.1 (on teamcity server)
Who here is installing Cypress globally?
This is something we don't test extensively because it's not recommended, so it could be a source of problems
I installed it globally on one of our Jenkins Agent, because every time we ran our jenkins job it was deleting the work space and re-installing Cypress. The install and unzipping of cypress was taking 5-6 minutes sometimes and this was timing out our Octopus job that were waiting for our test to pass. Not sure if this is the correct way to do it. We could not delete the works space, our delete everything else and leave the cypress node module there. I would also have to make sure everyone in our org is using the same version of cypress.
Cypress changed in 3.0, now it installs the binary outside the project, so you can cache that without worrying about caching node_modules.
https://docs.cypress.io/guides/guides/continuous-integration.html#
If you can ensure ~/.cache
gets preserved, Cypress won't have to reinstall!
I've just checked with this new information coming in:
Happens from both cmd.exe and powershell.exe
Interestingly, it happens even if there's no tests run.
do you use the teamcity reporter? (cypress plugin)
On Fri, 15 Jun 2018, 05:20 SaltyDH, notifications@github.com wrote:
I've just checked with this new information coming in:
- We don't have Cypress installed globally. (only gulp and yarn)
- Node 10.4.1 has not fixed it for us on TeamCity server.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/cypress-io/cypress/issues/1841#issuecomment-397509154,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABXd14qjrmIGImfN3HECCmAgW8iSDRVlks5t8zYJgaJpZM4UVcyf
.
Guys, any news on this one? It's pretty ugly one :(
@zerdos I don't use the teamcity reporter. I am using the webpack plugin however in case that's relevant.
@zerdos I use the teamcity reporter.
I'm getting this error, though I have not tried updating Node.js
Looking into this now...
Good news - was able to reproduce this, but only in some specific versions of node
.
@brian-mann Do you have any idea when this will be released?
Released in 3.0.2
.
Most helpful comment
Guys, any news on this one? It's pretty ugly one :(