Skip to content

RPC to Durable Objects should work with multiple wrangler dev sessions #11944

@mgandolfi7

Description

@mgandolfi7

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.

Metadata

Metadata

Labels

multiworkerRelating to multiworker

Type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions