Skip to content

ctx.id.name change in 0.22.0 is breaking cross-worker on vite dev #2213

Description

@wjvantilburg

Hey legends,

It seems the ctx.id.name change in 0.22.0 is fully breaking our Dev DO's on newly created objects.

It's a dev issue.

Our two-worker setup (we got more, but those 2 are the relevant ones):

  • dashboard-app service with a React front-end and some worker-first API endpoints.
  • agents service

Both run on cloudflare-vite with their own dev domains (CF Tunnelled)

cloudflare({
	persistState: {
	   path: '../cf-local-shared-state',
	},
}),

dashboard-app: Create Project > agentFetch > Project DO created.
dashboard-app api (auth > switch-project) tries to fetch with getAgentByName(c.env.ProjectAgent, foo):

Agent could not determine its Durable Object name. Address it with idFromName() or getByName().

^ slimmed-down flow (we also have an OrganizationAgent, managers etc, yes we went all-in on DO for this 😛 and loving it)

This fully breaks the app and very hard to recover (luckily we have AI now haha).

My colleague made a bug ticket in workers-sdk
cloudflare/workers-sdk#15496 (see last comment for repro)

We tried looking at Auxiliary Workers (docs are very wrangler focused btw), but that does not seem the right fit for us.

Thanks in advance!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions