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
I'm not sure if I understood the ... syntax correctly, and whether the changes I tested match the original code. With the modified code, it works with selfSignedCert: true.
I think the root cause is that we're mixing two undici versions: Node's built-in one (global fetch()) and npm undici@8 (new Agent()). Their internal handler interfaces don't seem to match anymore, so passing an npm-undici Agent as dispatcher to global fetch() throws invalid onRequestStart method.
If that's really the case, using require("undici").fetch instead of global fetch() when we pass a dispatcher should fix it - so Agent and fetch come from the same package.
@khassel I think your patch with { opt } nests the options object instead of spreading them? That would silently drop the dispatcher, so selfSignedCert stops crashing but probably also stops actually working.
I think I'll find time tomorrow to dig into it a bit more and check my theory 😪
Activity
KristjanESPERANTO commentedon Apr 5, 2026
I suspect this is caused by undici v8 changing the
allowH2default fromfalsetotrue.Could you check whether your calendars are served over HTTP/1.1 or HTTP/2?
And which server software is running (nginx, Apache, custom)?
Like this:
rejas commentedon Apr 7, 2026
Both calendars (working and non working) seem to return the same:
As you can see, its running on a Synology NAS, where nginx is configured
KristjanESPERANTO commentedon Apr 7, 2026
That blows my theory out of the window :-(
If we really do release a point release and can't find a solution before, we should downgrade to version 7 for that release.
rejas commentedon Apr 7, 2026
Logging he actual error we get shows this:
rejas commentedon Apr 7, 2026
oh, this is the culprit in my config, the failing calendar has "selfSignedCert: true (dont know hwy I adde dit there but not in the other)
khassel commentedon Apr 7, 2026
I'm not sure if I understood the
...syntax correctly, and whether the changes I tested match the original code. With the modified code, it works withselfSignedCert: true.KristjanESPERANTO commentedon Apr 7, 2026
I think the root cause is that we're mixing two undici versions: Node's built-in one (global
fetch()) and npm undici@8 (new Agent()). Their internal handler interfaces don't seem to match anymore, so passing an npm-undici Agent asdispatcherto globalfetch()throwsinvalid onRequestStart method.If that's really the case, using
require("undici").fetchinstead of globalfetch()when we pass a dispatcher should fix it - so Agent and fetch come from the same package.@khassel I think your patch with
{ opt }nests the options object instead of spreading them? That would silently drop the dispatcher, soselfSignedCertstops crashing but probably also stops actually working.I think I'll find time tomorrow to dig into it a bit more and check my theory 😪
khassel commentedon Apr 7, 2026
yes, replacing
const { Agent } = require("undici");withconst { fetch, Agent } = require("undici");worksrejas commentedon Apr 8, 2026
you guys are great! thanks for handling all this network/server/library stuff!
fix(http_fetcher): use undici.fetch when dispatcher is present
KristjanESPERANTO commentedon Apr 8, 2026
Thank you for your appreciative words! 🙂 I find problems like this kind of annoying, but also fascinating.
I woke up too early today, so I worked on it some more and created PR #4097.
fix(http_fetcher): use undici.fetch when dispatcher is present (#4097)
khassel commentedon Apr 8, 2026
This has now been merged, so @rejas, could you please check if it now works on
developand close this issue if necessary?yulisunny commentedon Apr 22, 2026
FYI the official way of handling this until node bundles undici 8 is documented on the Undici official documentation here:
https://github.com/nodejs/undici/blob/main/docs/docs/api/Dispatcher.md#compatibility-notes