downeydabber
CDCloudflare Developers
•Created by downeydabber on 2/1/2025 in #workers-help
Using local DO bindings from another worker script
I am trying to use DO bindings for local development but I am running into some issues. The docs (https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/#local-development) seem to indicate that you can bind two local workers by calling
wrangler dev
on each of them. But that is giving me an issue.
My DO worker is defined like this:
here is the wrangler.json:
Then I am trying to call the DO from another worker like so:
the wrangler.json is defined as:
I try to run wrangler dev on the DO worker and then wrangler dev on the main worker, however the main worker gives me this message:
Then when I try to access the DO, it is giving: DO access error: Error: Cannot access 'DurableObjectClassName#sayHello' as Durable Object RPC is not yet supported between multiple 'wrangler dev' sessions.
The docs seem to indicate that it is supported. If I run wrangler dev -c wrangler.json -c do-worker/wrangler.json
, the two workers are able to communicate and the binding works correctly. Once I start them separately, then I am running into the issue that they can't talk.2 replies