NuxtN
Nuxt3mo ago
5 replies
slava

Fetch handler error: fetch failed

After upgrading Nuxt from 3.18.0 to 3.19.3, the site won't load and shows the error in the screenshot. This error shows in the console:

ERROR  Fetch handler error: fetch failed
   at node:internal/deps/undici/undici:13510:13
   at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
   at async Server.<anonymous> (/Users/slavanossar/Repositories/madetogether/made-together-evolution/node_modules/.pnpm/@nuxt+cli@3.29.3_magicast@0.3.5/node_modules/@nuxt/cli/dist/chunks/dev.mjs:232:27)
nuxt:dev:
 [cause]: invalid connection header
nuxt:dev:
     at processHeader (node:internal/deps/undici/undici:2168:17)
     at new Request (node:internal/deps/undici/undici:1998:15)
     at [dispatch] (node:internal/deps/undici/undici:7802:25)
     at Client.Intercept (node:internal/deps/undici/undici:7535:20)
     at Client.dispatch (node:internal/deps/undici/undici:588:44)
     at [dispatch] (node:internal/deps/undici/undici:819:32)
     at Pool.dispatch (node:internal/deps/undici/undici:588:44)
     at [dispatch] (node:internal/deps/undici/undici:8230:27)
     at Agent.Intercept (node:internal/deps/undici/undici:7535:20)
     at Agent.dispatch (node:internal/deps/undici/undici:588:44)


Note that I am running Nuxt behind a reverse proxy for local development, and loading
localhost:3000
works correctly. I can't see anything in the release changelog that would indicate what the issue is.

My Vite server config looks like this

server: {
      origin: NEXT_PUBLIC_SITE_URL,
      hmr: {
        protocol: 'wss',
        host: 'mycustomdomain.test',
        clientPort: 443,
      },
    },


I tried disabling HMR with hmr: false, as well as removing the config entirely to see if it would fix it, but the issue persists
image.png
Was this page helpful?