start-server-and-test icon indicating copy to clipboard operation
start-server-and-test copied to clipboard

server closed unexpectedly while running on Azure.

Open alucardu opened this issue 4 years ago • 9 comments

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

alucardu avatar Apr 22 '20 13:04 alucardu

Possibly related #250

AleksanderBodurri avatar Apr 24 '20 21:04 AleksanderBodurri

Any progress on finding the issue? It seems the bug is not platform dependend.

alucardu avatar Apr 29 '20 19:04 alucardu

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.

bahmutov avatar Apr 29 '20 19:04 bahmutov

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.

endophage avatar Apr 29 '20 22:04 endophage

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.

dominikwilkowski avatar Jul 04 '20 23:07 dominikwilkowski

I'm facing the same issue 😭

thedaviddias avatar Jul 07 '20 19:07 thedaviddias

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

DAnselC avatar Jul 17 '20 15:07 DAnselC

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...

dominikwilkowski avatar Jul 18 '20 09:07 dominikwilkowski

Related #250

samlucax avatar Sep 13 '20 05:09 samlucax