[codex] Fix detached ArrayBuffer proxy DX#1985
Conversation
🦋 Changeset detectedLatest commit: e401ced The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) workflow with 10 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) workflow with 25 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) workflow with 50 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) workflow with 10 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) workflow with 25 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) workflow with 50 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) stream pipeline with 5 transform steps (1MB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) 10 parallel streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) fan-out fan-in 10 streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
❌ Some benchmark jobs failed:
Check the workflow run for details. |
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (2 failed)nextjs-turbopack (1 failed):
vite (1 failed):
🐘 Local Postgres (1 failed)nextjs-webpack-stable-lazy-discovery-enabled (1 failed):
Details by Category❌ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
❌ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
| const DETACHED_ARRAYBUFFER_ERROR = | ||
| 'Cannot perform ArrayBuffer.prototype.slice on a detached ArrayBuffer'; | ||
| const PROXY_HANDLER_DOCS_URL = | ||
| 'https://useworkflow.dev/docs/getting-started/next#configure-proxy-handler'; |
There was a problem hiding this comment.
| 'https://useworkflow.dev/docs/getting-started/next#configure-proxy-handler'; | |
| 'https://workflow-sdk.dev/docs/getting-started/next#configure-proxy-handler'; |
* fix(world-local): explain detached ArrayBuffer proxy failures * fix(docs): make proxy handler anchor navigable * fix(docs): open accordions for hash links Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
|
Backport PR opened against |
* fix(world-local): explain detached ArrayBuffer proxy failures * fix(docs): make proxy handler anchor navigable * fix(docs): open accordions for hash links Signed-off-by: Pranay Prakash <pranay.gp@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
@workflow/world-localqueue logging for theCannot perform ArrayBuffer.prototype.slice on a detached ArrayBufferfailure modeproxy.ts/middleware.tsmatcher fix when/.well-known/workflow/*is being interceptedRoot cause
When a Next.js proxy or middleware reads the request body for Workflow's internal
POST /.well-known/workflow/v1/flowrequest, the underlying ArrayBuffer can be detached before the executor reads it. The local queue then surfaces an undici-stylefetch failederror with a detached-ArrayBuffer cause, which is technically correct but not actionable enough on its own.What changed
packages/world-local/src/queue.tsfetchpathdocs/content/docs/v4/getting-started/next.mdxanddocs/content/docs/v5/getting-started/next.mdxCloses #1982
Validation
git diff --checkpnpm,npm,corepack, andnode_modulesare unavailable here