Open chaselw opened 5 years ago
Currently in the package.json of start-server-and-test they rely on
"execa": "0.11.0"
Latest is 2.0.4. Their latest build mentions "improved windows support". I wonder if updating to the latest version will fix.
Currently in the package.json of start-server-and-test they rely on
"execa": "0.11.0"
Latest is 2.0.4. Their latest build mentions "improved windows support". I wonder if updating to the latest version will fix.
I'm seeing the exact same outcome on a Mac. My co-worker is not seeing the error on the exact same code base as me and he is running Linux.
Yeah I didn't update but essentially same thing with me. Seeing the error on my Windows machine but on our devbuild that runs linux it's not a problem. We just ignore the error for now but it would be nice if it wasn't there.
We have a similar issue, we are using start-server-and-test
for starting React SPA before running Cypress tests and when some of the tests fail it doesn't stop correctly and I get this error:
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! ssc-ui-core@1.0.0 cypress:run:junit: `yarn cypress:run --reporter junit --reporter-options mochaFile=test/reports/cypress/[hash].xml`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the ssc-ui-core@1.0.0 cypress:run:junit 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/rpodrazky/.npm/_logs/2019-09-16T13_33_31_198Z-debug.log
start-server-and-test getting child processes +3m
start-server-and-test stopping child processes +57ms
start-server-and-test stopping server +1ms
INFO: Gracefully shutting down. Please wait...
{ Error: Command failed: /bin/sh -c npm run cypress:run:junit
at makeError (/Users/rpodrazky/Documents/PROJECTS/ssc-ui-core/node_modules/start-server-and-test/node_modules/execa/index.js:174:9)
at Promise.all.then.arr (/Users/rpodrazky/Documents/PROJECTS/ssc-ui-core/node_modules/start-server-and-test/node_modules/execa/index.js:278:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
code: 2,
stdout: null,
stderr: null,
failed: true,
signal: null,
cmd: '/bin/sh -c npm run cypress:run:junit',
timedOut: false,
killed: false }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I tried to update to latest version 1.10.2
, the error message changed a little bit but it still fails
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ssc-ui-core@1.0.0 cypress:run:junit: `yarn cypress:run --reporter junit --reporter-options mochaFile=test/reports/cypress/[hash].xml`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ssc-ui-core@1.0.0 cypress:run:junit 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/rpodrazky/.npm/_logs/2019-09-16T13_40_14_153Z-debug.log
start-server-and-test getting child processes +39s
start-server-and-test stopping child processes +56ms
start-server-and-test stopping server +1ms
INFO: Gracefully shutting down. Please wait...
{ Error: Command failed with exit code 1 (EPERM): npm run cypress:run:junit
at makeError (/Users/rpodrazky/Documents/PROJECTS/ssc-ui-core/node_modules/start-server-and-test/node_modules/execa/lib/error.js:58:11)
at handlePromise (/Users/rpodrazky/Documents/PROJECTS/ssc-ui-core/node_modules/start-server-and-test/node_modules/execa/index.js:112:26)
at process._tickCallback (internal/process/next_tick.js:68:7)
command: 'npm run cypress:run:junit',
exitCode: 1,
exitCodeName: 'EPERM',
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
signal: undefined }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
It happens both locally (MacOS Mojave) and also in CI (Jenkins on Ubuntu)
Scipts I'm running
"cypress:run": "cypress run -e TAGS=\"not @ignore\"",
"cypress:run:junit": "yarn cypress:run --reporter junit --reporter-options mochaFile=test/reports/cypress/[hash].xml",
"cypress:run:ci": "start-server-and-test serve http://localhost:3017 cypress:run:junit",
Package versions
"cypress": "3.3.1",
"cypress-cucumber-preprocessor": "1.11.2",
"serve": "^11.1.0",
"start-server-and-test": "^1.10.2",
We are having the same issue. It works when running it locally on Windows 10, but our CI (Google Cloud Build with a Debian LTS docker image) shows the same error.
Package versions:
"start-server-and-test": "^1.10.6",
"webpack": "^4.35.0",
"webpack-cli": "^3.3.5",
"webpack-dev-server": "^3.7.2",
"cypress": "^3.4.1"
Scripts:
"cypress": "cypress run",
"test:e2e": "start-server-and-test start:mock-firebase http-get://localhost:9000 cypress"
(Note: webpack-dev-server is configured for port 9000)
EDIT:
After running in debug mode, I see the error happens when attempting to kill the child processes of the web server. A custom script I now use, based directly on execa
v3.2.0 only kills the server itself, and that seems to work. Maybe this issue stems from the task-killing behavior?
@grundius would you mind sharing your fix? We're running into the same issue as well, even on the latest version.
I was having a similar issue, I stumbled upon this other issue #132, and this comment solved my problem.
Is this a bug report or a feature request? bug report
expected behavior: After server is up and tests have completed running the server should stop and exit without error.
actual behavior: After the server is up and tests have completed running I get the above stack trace error and the server remains live.
Running on Windows 10 bash terminal.
Ran with debug mode. Stack trace is:
scripts I'm running are:
package.json:
on jenkins got extra stack trace info