start-server-and-test
start-server-and-test copied to clipboard
server closed unexpectedly while running on Azure.
Is this a bug report or a feature request? Bug report
If this is a bug report, please provide as much info as possible
- version
"start-server-and-test": "^1.11.0",
- platform Microsoft Azure
- expected behavior Run a Cypress test on a Azure environment
- actual behavior server closes unexpectedly
lerna success exec Executed command in 1 package: "yarn start --all-apps"
Error: server closed unexpectedly
at ChildProcess.onClose (D:\a\1\s\node_modules\start-server-and-test\src\index.js:69:14)
at ChildProcess.emit (events.js:209:13)
at ChildProcess.cp.emit (D:\a\1\s\node_modules\start-server-and-test\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
##[error]Cmd.exe exited with code '1'.
Finishing: Run Cypress testsk
Possibly related #250
Any progress on finding the issue? It seems the bug is not platform dependend.
I did not have time to look into this
Sent from my iPhone
On Apr 29, 2020, at 15:46, Peter Boomsma [email protected] wrote:
Any progress on finding the issue? It seems the bug is not platform dependend.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I've also been debugging this for the last 24 hours. It appears the issue is here: https://github.com/facebook/create-react-app/issues/8688
React-scipts added some shutdown logic in a patch release that's broken and causing issues in both Docker and CI environments.
I have the same issue in CircleCI: https://app.circleci.com/pipelines/github/dominikwilkowski/bronzies/122/workflows/aafbb9bc-9d96-4836-8204-2c03a545d5c0/jobs/247 (Also using CRA)
Seems related. What's curious though is that when I ssh into the instance and run the same command that fails in ci, it runs without issues suggesting that the ssh session keeps something alive that's otherwise shutdown in ci.
I'm facing the same issue 😭
FYI, I was running into this exact error after upgrading react-scripts to 3.4.1 while running Cypress tests in an Azure pipeline with start-server-and-test.
The fix for this issue is to add an env variable of CI=true
to your environment variables
Just tried the solution from @DAnselC but it still fails the same way in circleCI... https://app.circleci.com/pipelines/github/dominikwilkowski/bronzies/125/workflows/79b6d12f-9ef7-429b-8df6-ee61b7d53662/jobs/254
Thanks for sharing though. Might help someone else with Azure...
Related #250