Skip to content

one serve on Node 26.11+ answers route loader requests with 500: TypeError: Illegal invocation from new Request(finalUrl, request) #1109

Closed

Description

@YevheniiKotyrlo

Current Behavior

On Node 26.11 and later, one serve answers the request for a route's loader module, which the client imports before it renders a route it navigates to (linkTo, doPreload), with 500, and logs TypeError: Illegal invocation from new Request(finalUrl, request). request is @hono/node-server's lightweight request, whose duplex falls through to the getter undici brand-checks from Node 26.11 on (honojs/node-server#408).

Expected Behavior

one serve answers the loader request on Node 26 as it does on Node 24.

One Version

main at 2c6b6be, with its @hono/node-server 2.1.6; v2.13.6 has the same line and range

Platform (Web, iOS, Android)

Web (one serve)

Reproduction

https://github.com/YevheniiKotyrlo/one/tree/repro/serve-node-26-navigation

repro/ runs against the checkout's own packages. With Node 26.11 or later on PATH, bash repro/reproduce.sh installs and builds the checkout, builds repro/, starts one serve, requests / and the loader module of / with the build's cache key, and exits 1 while that request answers 500 and the server logs TypeError: Illegal invocation. In Docker's node:26 image it ends with:

node v26.13.0, undici 8.12.2
GET / -> 200
GET /assets/_72593962_vxrn_loader.js -> 500
TypeError: Illegal invocation
    at webidl.brandCheck (node:internal/deps/undici/undici:3602:21)
    at get duplex (node:internal/deps/undici/undici:13702:16)
    at Object.RequestInit (node:internal/deps/undici/undici:3860:35)
    at new Request (node:internal/deps/undici/undici:13322:34)
    at new Request$1 (file:///one/node_modules/@hono/node-server/dist/index.mjs:211:3)
    at file:///one/packages/one/dist/esm/server/oneServe.mjs:707:28

In Docker's node:24 image the same script exits 0, ending with:

node v24.22.2, undici 7.30.1
GET / -> 200
GET /assets/_65796643_vxrn_loader.js -> 200

vxrn depends on @hono/node-server ^2.1.6 since #1105, and 2.1.6 is its latest release; honojs/node-server#409, the fix for honojs/node-server#408, is open.

System Info

Debian GNU/Linux 13 (trixie), node v26.13.0, bun 1.4.4, https://github.com/yevheniikotyrlo/one.git at 42aea95d846c1326fc6e24a9b43e6e33f7b13e70

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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