Situation
Running node src/ping-cli.js http://localhost:3000 using Node.js 24.20.0 when there is no webserver available on localhost shows an immediate error ERR_SOCKET_CLOSED_BEFORE_CONNECTION instead of waiting.
Steps to reproduce
Under Node.js 24.20.0 or Node.js >=26.7.0, with no server running, execute:
node src/ping-cli.js http://localhost:3000
Logs
$ node src/ping-cli.js http://localhost:3000
pinging url http://localhost:3000 for 30 seconds
node:internal/process/promises:394
triggerUncaughtException(err, true /* fromPromise */);
^
Error [ERR_SOCKET_CLOSED_BEFORE_CONNECTION]: Socket closed before the connection was established
at Socket.onClose (node:net:1239:10)
at Socket.wrapper (node:events:639:12)
at Socket.emit (node:events:526:24)
at TCP.<anonymous> (node:net:362:12) {
code: 'ERR_SOCKET_CLOSED_BEFORE_CONNECTION'
}
Node.js v24.20.0
Assessment
The action currently uses got@11.8.6, released in Dec 2022, which is the latest CommonJS compatible version.
Higher versions, starting with got@12.0.0. released in Dec 2021, are pure ESM.
got@16.0.0, released on Aug 31, 2026, includes the fix "Retry on connection errors reported by request.end() instead of failing the request"
Suggestion
Migrate
Situation
Running
node src/ping-cli.js http://localhost:3000using Node.js 24.20.0 when there is no webserver available on localhost shows an immediate errorERR_SOCKET_CLOSED_BEFORE_CONNECTIONinstead of waiting.Steps to reproduce
Under Node.js 24.20.0 or Node.js >=26.7.0, with no server running, execute:
Logs
Assessment
The action currently uses got@11.8.6, released in Dec 2022, which is the latest CommonJS compatible version.
Higher versions, starting with got@12.0.0. released in Dec 2021, are pure ESM.
got@16.0.0, released on Aug 31, 2026, includes the fix "Retry on connection errors reported by
request.end()instead of failing the request"Suggestion
Migrate