Skip to content

fix(miniflare): skip named entrypoint for flagship binding in remote mode#13472

Merged
petebacondarwin merged 4 commits intocloudflare:mainfrom
roerohan:roerohan/flagship-remote-bindings
Apr 15, 2026
Merged

fix(miniflare): skip named entrypoint for flagship binding in remote mode#13472
petebacondarwin merged 4 commits intocloudflare:mainfrom
roerohan:roerohan/flagship-remote-bindings

Conversation

@roerohan
Copy link
Copy Markdown
Member

@roerohan roerohan commented Apr 14, 2026

Summary

  • Fix wrangler dev crash when using a Flagship binding with remote: true

Details

In remote mode, the flagship binding is backed by a generic proxy worker that forwards RPC calls to Cloudflare's edge. That proxy worker only has a default export, but the plugin was telling workerd to look for a named export called "FlagshipBinding" — which doesn't exist on it, causing workerd to fail with:

Worker "core:user:..."'s binding "FLAGS" refers to service "flagship:FLAGS:remote-..."
with a named entrypoint "FlagshipBinding", but "flagship:FLAGS:remote-..." has no such named entrypoint.

The fix skips the named entrypoint in remote mode so workerd uses the default export instead, which correctly proxies all method calls to the remote service. This matches how the email plugin already handles the same situation for SendEmailBinding.



  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: Docs are being written for the entire service, in a separate PR.

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

…mode

In remote mode, the flagship binding is backed by a generic proxy worker
that only has a default export. The plugin was telling workerd to look
for a named entrypoint 'FlagshipBinding' which doesn't exist on it,
causing wrangler dev to crash. Skip the named entrypoint in remote mode
so workerd uses the default export, which correctly proxies all method
calls to the remote service.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 14, 2026

🦋 Changeset detected

Latest commit: 8c3b034

The changes in this PR will be included in the next version bump.

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

@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Apr 14, 2026
@workers-devprod workers-devprod requested review from a team and jamesopstad and removed request for a team April 14, 2026 18:03
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Apr 14, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 14, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13472

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13472

miniflare

npm i https://pkg.pr.new/miniflare@13472

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13472

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13472

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13472

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13472

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13472

wrangler

npm i https://pkg.pr.new/wrangler@13472

commit: 8c3b034

Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot @roerohan - LGTM.
I wonder if we should create a single remote e2e test to check the happy path for this as a general regression test.
Happy for that to be in a follow up.

Notably the Stream binding has the same problem https://github.com/cloudflare/workers-sdk/pull/13030/changes#r3082741496

Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@roerohan
Copy link
Copy Markdown
Member Author

roerohan commented Apr 15, 2026

Notably the Stream binding has the same problem https://github.com/cloudflare/workers-sdk/pull/13030/changes#r3082741496

Had the repo open, so updated the stream binding with the same change!

#13476

@petebacondarwin petebacondarwin merged commit 58292f6 into cloudflare:main Apr 15, 2026
67 of 69 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants