-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Closed
Feature
Copy link
Labels
enhancementNew feature or requestNew feature or request
Description
What versions & operating system are you using?
System:
OS: Linux 6.12 Pop!_OS 22.04 LTS
CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
Memory: 36.06 GB / 62.67 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 22.12.0 - ~/.nvm/versions/node/v22.12.0/bin/node
npm: 11.1.0 - ~/.nvm/versions/node/v22.12.0/bin/npm
pnpm: 10.13.1 - ~/.nvm/versions/node/v22.12.0/bin/pnpm
npmPackages:
wrangler: ^4.26.0 => 4.26.0
Please provide a link to a minimal reproduction
https://github.com/leobuskin/rc-repro
Describe the Bug
Remote bindings to service worker in local dev doesn't work.
worker-a is using a service from worker-b:
"services": [
{
"binding": "WORKER_B",
"service": "worker-b",
"entrypoint": "WorkerBService",
"experimental_remote": true
}
]
worker-b is deployed to cloudflare
worker-a is being executed as wrangler dev --x-remote-bindings
(just in case, I've also tried wrangler dev -c ./wrangler.jsonc -c ../workerB/wrangler.jsonc --x-remote-bindings)
http://localhost:8787 fails with TypeError: The RPC receiver does not implement the method "getValue"
https://worker-a.*.worker.dev - works fine
How to reproduce:
git clone https://github.com/leobuskin/rc-repro.git
cd rc-repro
pnpm install
pnpm deploy:all
pnpm dev
According to the official documentation it should work (I've seen that Durable Objects are not supported yet, but Service Workers were not on the list + I've seen some samples in the closed issues that probably worked for others)
Please provide any relevant error logs
✘ [ERROR] TypeError: The RPC receiver does not implement the method "getValue".
at async Object.fetch
(file:///temp/rcp-repro/workerA/src/index.ts:8:15)
at async jsonError
(file:///temp/rcp-repro/node_modules/.pnpm/[email protected]/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts:22:10)
at async drainBody
(file:///temp/rcp-repro/node_modules/.pnpm/[email protected]/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts:5:10)
{
remote: true
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done