You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v2.338.0: steps that start a background server and poll localhost fail immediately ("Socket closed before the connection was established"); v2.337.0 is fine #4788
Describe the bug
After our self-hosted runners moved from v2.337.0 to v2.338.0, jobs that start a
dev server in the background and then wait for it on localhost started failing
within about a second. The same repo code and workflow pass on v2.337.0.
The failing step uses a Cypress GitHub Action that runs start: <dev server command> and wait-on: http://localhost:<port>. The log
shows "waiting on http://localhost:" and then immediately:
##[error]Socket closed before the connection was established
The step previously took several minutes (server start plus tests). Nothing from
the dev server is logged before the failure.
What is and isn't affected
Build, lint, unit-test and type-check jobs on the same runners pass.
Only steps that start a background server and connect to localhost fail.
Reproduced in two unrelated repos, using two different versions of the same
Cypress action (v2 and v7.3.0), different package managers (yarn, pnpm) and
different Node versions (20.20.0, 22.16.0).
To Reproduce
Self-hosted Linux x64 runner, ephemeral, on v2.338.0.
Run a workflow step that starts a dev server in the background and waits on http://localhost:<port> (we used a Cypress action with start and wait-on).
The step fails in about 1 second with the error above.
Expected behavior
Same as v2.337.0: the server starts, wait-on connects, tests run.
Evidence that it's the runner version
Last passing run: runner 2.337.0. First failing runs: runner 2.338.0.
No change to the workflow or repo code between them.
Rolling the runner back to v2.337.0 fixed it. Re-running the same failed jobs
now passes.
Possibly related changes in v2.338.0 (unconfirmed)
Thanks for the detailed report, I was able to reproduce this.
2.338.0 bumped the bundled Node 24 from 24.19.0 to 24.21.0. Since Node 24.20.0 (nodejs/node#64847), a refused connection on localhost also surfaces ERR_SOCKET_CLOSED_BEFORE_CONNECTION, and got v11 to v15 treats that as fatal instead of retrying. The Cypress action used got 11 until v7.4.4, so wait-on gives up on the first refused connection instead of waiting for your server.
Updating to cypress-io/github-action@v7.4.4 or later fixes it (cypress-io/github-action#1873). I tested v2, v7.3.0 and v7.4.6 on both runner versions, and only v7.4.6 works on 2.338.0.
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION won't help here, since it only affects the runner's internal Node, not the one actions run on.
Activity
salmanmkc commentedon Oct 16, 2026
Thanks for the detailed report, I was able to reproduce this.
2.338.0 bumped the bundled Node 24 from 24.19.0 to 24.21.0. Since Node 24.20.0 (nodejs/node#64847), a refused connection on localhost also surfaces
ERR_SOCKET_CLOSED_BEFORE_CONNECTION, and got v11 to v15 treats that as fatal instead of retrying. The Cypress action used got 11 until v7.4.4, sowait-ongives up on the first refused connection instead of waiting for your server.Updating to
cypress-io/github-action@v7.4.4or later fixes it (cypress-io/github-action#1873). I tested v2, v7.3.0 and v7.4.6 on both runner versions, and only v7.4.6 works on 2.338.0.ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSIONwon't help here, since it only affects the runner's internal Node, not the one actions run on.ci: bump cypress-io/github-action to v7.4.6