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

server closed unexpectedly while running on Azure. #253

Open
alucardu opened this issue Apr 22, 2020 · 10 comments
Open

server closed unexpectedly while running on Azure. #253

alucardu opened this issue Apr 22, 2020 · 10 comments

Comments

@alucardu
Copy link

alucardu commented Apr 22, 2020

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
@AleksanderBodurri
Copy link

Possibly related #250

@alucardu
Copy link
Author

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

@bahmutov
Copy link
Owner

bahmutov commented Apr 29, 2020 via email

@endophage
Copy link

endophage commented Apr 29, 2020

I've also been debugging this for the last 24 hours. It appears the issue is here: facebook/create-react-app#8688

React-scipts added some shutdown logic in a patch release that's broken and causing issues in both Docker and CI environments.

@dominikwilkowski
Copy link

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.

@thedaviddias
Copy link

I'm facing the same issue 😭

@DAnselC
Copy link

DAnselC commented Jul 17, 2020

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

@dominikwilkowski
Copy link

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

@samlucax
Copy link

Related #250

@ruthytee
Copy link

@alucardu @bahmutov
I know a been a very long time, but a currently suck on this same issue, any ideas on how to resolve this will greatly be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants