Skip to content

🐛 BUG: Service binding doesn't connect to worker running locally with environment #8450

@hexium310

Description

@hexium310

Which Cloudflare product(s) does this pertain to?

Wrangler

What versions are you using?

3.114.1 [Wrangler]

What operating system and version are you using?

Arch Linux on WSL

Please provide a link to a minimal reproduction

https://github.com/hexium310/wrangler-service-binding-environment-repro

Describe the Bug

Service binding from a worker (worker_a) to another worker (worker_b) running locally with an environment doesn't connect, and using the same/other environment as worker_b in worker_a doesn't either. It has no problem connecting to worker_b without an environment.

Steps to reproduce

  1. Clone the above link and pnpm install.
  2. Launch worker_b with environment
pnpm exec wrangler --env development -c wrangler.worker_b.toml
  1. Launch worker_a in other terminal
pnpm exec wrangler -c wrangler.worker_a.toml

2 and 3 are the same in reverse.

Actual behaviour

connection fails
Image

Expected behaviour

connection succeeds

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't workingcaretakingPriority for caretakingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions