From 5a1793eaa4025c975790b30e3eb9612dc8ba45b9 Mon Sep 17 00:00:00 2001 From: Rohan Mukherjee Date: Wed, 15 Apr 2026 11:39:53 +0530 Subject: [PATCH 1/2] [miniflare] Fix Stream binding crash with remote: true --- .changeset/fix-stream-remote-entrypoint.md | 7 +++++++ packages/miniflare/src/plugins/stream/index.ts | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-stream-remote-entrypoint.md diff --git a/.changeset/fix-stream-remote-entrypoint.md b/.changeset/fix-stream-remote-entrypoint.md new file mode 100644 index 0000000000..1cdf723fda --- /dev/null +++ b/.changeset/fix-stream-remote-entrypoint.md @@ -0,0 +1,7 @@ +--- +"miniflare": patch +--- + +Fix `wrangler dev` crash when using a Stream binding with `remote: true` + +In remote mode, the Stream binding is backed by a generic proxy worker that only has a default export. The plugin was requesting a named entrypoint `"StreamBinding"` which doesn't exist on it, causing workerd to reject the binding at startup. The named entrypoint is now omitted in remote mode so workerd routes to the default export, which correctly proxies all RPC calls to the remote Stream service. diff --git a/packages/miniflare/src/plugins/stream/index.ts b/packages/miniflare/src/plugins/stream/index.ts index 02853b3957..0635e35363 100644 --- a/packages/miniflare/src/plugins/stream/index.ts +++ b/packages/miniflare/src/plugins/stream/index.ts @@ -56,7 +56,9 @@ export const STREAM_PLUGIN: Plugin< options.stream.binding, options.stream.remoteProxyConnectionString ), - entrypoint: "StreamBinding", + entrypoint: options.stream.remoteProxyConnectionString + ? undefined + : "StreamBinding", }, }, ]; From a0d6d0da35b293135820b489adaceca387e95428 Mon Sep 17 00:00:00 2001 From: Rohan Mukherjee Date: Wed, 15 Apr 2026 11:50:05 +0530 Subject: [PATCH 2/2] [miniflare] Format stream plugin file --- packages/miniflare/src/plugins/stream/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/miniflare/src/plugins/stream/index.ts b/packages/miniflare/src/plugins/stream/index.ts index 0635e35363..a921cbe154 100644 --- a/packages/miniflare/src/plugins/stream/index.ts +++ b/packages/miniflare/src/plugins/stream/index.ts @@ -57,8 +57,8 @@ export const STREAM_PLUGIN: Plugin< options.stream.remoteProxyConnectionString ), entrypoint: options.stream.remoteProxyConnectionString - ? undefined - : "StreamBinding", + ? undefined + : "StreamBinding", }, }, ];