Skip to content

self bindings are logged as [not connected] in wrangler dev #8970

@terozio

Description

@terozio

Which Cloudflare product(s) does this pertain to?

Wrangler

What versions & operating system are you using?

Wrangler 4.10

Please provide a link to a minimal reproduction

https://github.com/cloudflare/workers-sdk/tree/main/fixtures/workers-with-assets

Describe the Bug

My original use case was to be able to call a worker from a durable object by using a service binding. I wanted to invoke the same worker that deployes the DO. This was to offload processing of external api calls that the DO needs to when receiving web socket messages (to avoid blocking the DO).

Did not find any explicit mention from documentation if the "self binding" is officially supported, but looking into the workers-sdk repo I found the linked example of a worker declaring a named entry point and invoking that.

Grabbed the code and tried to run it locally with wrangler dev, when wrangler starts up it reports the service binding as disconnected and is unable to call that.

Is there a way to make this work locally also? Have not tested if it works differently after deploying to cloudflare, as I would need to have both local and real versions working.

Please provide any relevant error logs

Your worker has access to the following bindings:
- Services:
  - NAMED: worker-with-assets#NamedEntrypoint [not connected]
- Assets:
  - Binding: ASSETS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't working

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions