Skip to content

TypeError: RequestInit: Expected signal ("AbortSignal {}") to be an instance of AbortSignal. #4966

Open
@MarcMcIntosh

Description

@MarcMcIntosh

Happens when using node v24.0.0, with vitest, msw and jsdom.

Full error

An unhandled error occurred processing a request for the endpoint "ping".
In the case of an unhandled error, no tags will be "provided" or "invalidated". TypeError: RequestInit: Expected signal ("AbortSignal {}") to be an instance of AbortSignal.
    at Object.webidl.errors.exception (node:internal/deps/undici/undici:4096:14)
    at Object.AbortSignal (node:internal/deps/undici/undici:4338:31)
    at node:internal/deps/undici/undici:10747:41
    at node:internal/deps/undici/undici:4389:16
    at Object.RequestInit (node:internal/deps/undici/undici:4371:21)
    at new Request (node:internal/deps/undici/undici:10111:34)
    at Object.construct (file:///Users/marc/Projects/refact/refact-agent/gui/node_modules/@mswjs/interceptors/src/interceptors/ClientRequest/utils/recordRawHeaders.ts:185:33)
    at file:///Users/marc/Projects/refact/refact-agent/gui/node_modules/@reduxjs/toolkit/src/query/fetchBaseQuery.ts:236:21
    at Object.queryFn (/Users/marc/Projects/refact/refact-agent/gui/src/services/refact/ping.ts:15:26)
    at executeRequest (file:///Users/marc/Projects/refact/refact-agent/gui/node_modules/@reduxjs/toolkit/src/query/core/buildThunks.ts:308:20)

passes with node version 22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions