On Vercel, workflow runs never complete or appear in the dashboard: queue handler and run-event reporting fail with "TypeError: fetch failed → Cannot read private member #u" (Next 16 / Turbopack build)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 365
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 169
Description
Description
Workflows deployed to Vercel never execute or register. start() enqueues the run (and sometimes throws itself), but every outbound call the SDK makes to vercel-workflow.com — and every queue delivery to /.well-known/workflow/v1/flow — fails with TypeError: fetch failed caused by Cannot read private member #u from an object whose class did not declare it.
Observable consequences:
- Workflows dashboard stays on the "Get Started" empty state — run events (
run_created,run_started) all fail (Observability → External APIs showsvercel-workflow.comat 100% error rate, 1–5 ms latency) - Observability → Queues shows the workflow queue with messages received 27 times, deleted 0 — the handler never acknowledges
- Runs retry until the delivery budget exhausts ("Queue message exhausted safety limit (256 attempts)")
The identical code works fine in local dev (local world).
Error
From production function logs (/.well-known/workflow/v1/flow, invoked by vercel-queue/v2beta):
[workflow] Queue handler failed for message "1v-1M1UwuuovWNgqVai0wLGPyCfGRAZ3WM6" on delivery attempt 1; retrying in 1s: TypeError: fetch failed
at async (.next/server/chunks/[root-of-the-server]__06jy23u._.js:6:1584)
at async (.next/server/chunks/[root-of-the-server]__06jy23u._.js:5:28701)
at async iq (.next/server/chunks/[root-of-the-server]__06jy23u._.js:19:7908)
...
[cause]: TypeError: Cannot read private member #u from an object whose class did not declare it
at new Promise (<anonymous>)
}
Note the stack is entirely inside a Turbopack-compiled chunk, and #u is a minified private field — Node's own undici uses readable names (#state, #headersList), so the failing class is a bundled copy meeting an object from another copy.
Environment
workflow: 4.8.0 (@workflow/world-vercel4.6.1,@workflow/next4.1.4)- Next.js 16.3, App Router, Turbopack build, pnpm monorepo
- Vercel production deployment, region dub1
- Fails identically on Node.js 22.x and 24.x — not Node-version related (we tested both via the
enginesoverride) - Cron route calls
start(workflowFn, [args]); workflow orchestrates ~9"use step"functions
Suspected cause
Two copies of the fetch/Request machinery end up in the deployed bundle (the SDK's client compiled into the Turbopack chunk vs. the runtime's), and an object constructed by one copy is passed to the other; accessing a private class field through the foreign instance throws. Same bug class as https://github.com/payloadcms/payload/pull/15116 (fixed there by forwarding the original target as receiver in proxy traps). Possibly Turbopack-build-specific — local dev (also Turbopack, unbundled runtime) is unaffected.
Reproduction
- Next.js 16.3 app with
withWorkflow, Turbopack production build, deployed to Vercel - Call
start()from a route handler - Queue message is created; every delivery fails with the error above; nothing ever appears in the Workflows dashboard; External APIs shows 100% errors to vercel-workflow.com
Workaround
None found within the SDK — pinning Node.js to 22.x does not help (same failure). We currently execute the same step functions inline (steps called outside a workflow run as plain functions) and keep the durable path behind an env flag. Untested: whether a webpack build avoids it.
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
Start by tracing start() and the /.well-known/workflow/v1/flow queue handler through the Turbopack production bundle, focusing on outbound calls to vercel-workflow.com and the fetch/Request objects they exchange. Reproduce the failure with the listed Next.js 16.3, Turbopack, and Node.js 22.x or 24.x setup; done means queue deliveries acknowledge and run events appear in the Workflows dashboard without the private-member error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, typescript
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100