-
Notifications
You must be signed in to change notification settings - Fork 1.2k
RPC to Durable Objects should work with multiple wrangler dev sessions #11944
Copy link
Copy link
Labels
multiworkerRelating to multiworkerRelating to multiworker
Description
Describe the solution
I requested #5918 be reopened for tracking however I did not hear back so decided to create a new issue.
Currently, accessing a Durable Object over RPC in multiple wrangler instances causes this error:
Cannot access `MyDurableObject#myMethod` as Durable Object RPC is not yet supported between multiple `wrangler dev` sessions.
To get around this, you can start all your workers/durable objects in one command (same Miniflare instance) by chaining -c however, this is not ideal for several reasons such as large monorepos with dozens of workers and durable objects depending on each other. Another workaround is to create a wrapper instance that extends WorkerEntrypoint which just proxies everything to the DO but this is an extra layer and a ton of duplication.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
multiworkerRelating to multiworkerRelating to multiworker
Type
Projects
Status
Backlog