@nx/cypress/plugins/cypress-preset fails with "Error: Web server failed to start in" in Github Actions #26990
OurxD
started this conversation in
Show and Tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
tl:dr
If you're experiencing this issue, set host to
127.0.0.1
on theciWebServerCommand
.Long Version
I've been investigating this for a while now. It works locally, ran from my machine as well as in the custom image we use in the action locally, but it fails when it runs in Github actions. It turns out to be due to the node request made to check if the server is running failing with the following:
Which hinted the final fix. Even though we're setting the
baseUrl
to behttp://localhost:4200
, the dns resolver ends up calling127.0.0.1
as mentioned here, failing to confirm the web server is running. By setting the host to be127.0.0.1
we ensure it will work in the runner, as node will resolve to that direction anyway. 🤷If you have more info around this please don't hesitate to comment or reach out, as I'm more than happy to learn further.
Beta Was this translation helpful? Give feedback.
All reactions