semantic-release / semantic-release/github
InvalidArgumentError: invalid onRequestStart method (node 26.x)
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 534
- Forks
- 150
- Avg merge
- 1m
- Merged PRs (30d)
- 3
Description
Semantic-release/github stopped working with node 26 for me.
Looks like some incompatibility with the new undici implementation in node:
node --version
v26.0.0
npx semantic-release
...
[12:18:06 PM] [semantic-release] › ✘ An error occurred while running semantic-release: RequestError [HttpError]: invalid onRequestStart method
at fetchWrapper (file:///XXX/build/pacc/node_modules/@octokit/request/dist-bundle/index.js:78:26)
at async requestWithGraphqlErrorHandling (file:///XXX/build/pacc/node_modules/@octokit/plugin-retry/dist-bundle/index.js:39:20)
at async Job.doExecute (/XXX/build/pacc/node_modules/bottleneck/light.js:405:18) {
status: 500,
request: {
method: 'GET',
url: 'https://api.github.com/repos/arlac77/pacc',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': '@semantic-release/github v12.0.8 octokit-core.js/7.0.6 Node.js/26',
authorization: 'token [REDACTED]'
},
request: {
agent: undefined,
fetch: [Function: fetchWithDispatcher],
hook: [Function: bound bound register],
retryCount: 3,
retries: 3,
retryAfter: 16
}
},
response: undefined,
pluginName: '@semantic-release/github',
[cause]: TypeError: fetch failed
at Object.processResponse (/XXX/build/pacc/node_modules/undici/lib/web/fetch/index.js:237:16)
at /XXX/build/pacc/node_modules/undici/lib/web/fetch/index.js:1081:19
at /XXX/build/pacc/node_modules/undici/index.js:157:7
at async fetchWrapper (file:///XXX/build/pacc/node_modules/@octokit/request/dist-bundle/index.js:52:21)
at async requestWithGraphqlErrorHandling (file:///XXX/build/pacc/node_modules/@octokit/plugin-retry/dist-bundle/index.js:39:20)
at async Job.doExecute (/XXX/build/pacc/node_modules/bottleneck/light.js:405:18) {
[cause]: InvalidArgumentError: invalid onRequestStart method
at assertRequestHandler (node:internal/deps/undici/undici:1873:15)
at new Request (node:internal/deps/undici/undici:2856:9)
at [dispatch] (node:internal/deps/undici/undici:9125:25)
at Client.dispatch (node:internal/deps/undici/undici:736:33)
at [dispatch] (node:internal/deps/undici/undici:1007:32)
at Pool.dispatch (node:internal/deps/undici/undici:736:33)
at [dispatch] (node:internal/deps/undici/undici:9610:27)
at Agent.dispatch (node:internal/deps/undici/undici:736:33)
at /XXX/build/pacc/node_modules/undici/lib/web/fetch/index.js:2154:51
at new Promise (<anonymous>) {
code: 'UND_ERR_INVALID_ARG'
}
}
}
AggregateError:
HttpError: invalid onRequestStart method
at fetchWrapper (file:///XXX/build/pacc/node_modules/@octokit/request/dist-bundle/index.js:78:26)
at async requestWithGraphqlErrorHandling (file:///XXX/build/pacc/node_modules/@octokit/plugin-retry/dist-bundle/index.js:39:20)
at async Job.doExecute (/XXX/build/pacc/node_modules/bottleneck/light.js:405:18)
at file:///XXX/build/pacc/node_modules/semantic-release/lib/plugins/pipeline.js:55:13
at async pluginsConfigAccumulator.<computed> [as verifyConditions] (file:///XXX/build/pacc/node_modules/semantic-release/lib/plugins/index.js:87:11)
at async run (file:///XXX/build/pacc/node_modules/semantic-release/index.js:106:3)
at async Module.default (file:///XXX/build/pacc/node_modules/semantic-release/index.js:278:22)
at async default (file:///XXX/build/pacc/node_modules/semantic-release/cli.js:55:5)%
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with Node v26.0.0 by running npx semantic-release, then inspect the interaction between @octokit/request and Node's undici implementation shown in the stack trace. Done means semantic-release can perform its GitHub request on Node 26 without the invalid onRequestStart error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100