Can't bind to durable object from Page ("This namespace no longer exists")

I’m trying to bind a Page to a Worker where I have implemented a Durable Object.

The binding is unsuccessful if I’m specifying it through wrangler.toml,

[[durable_objects.bindings]]
name = "ERROR_LIST"
class_name = "ErrorList"
script_name = 'bilagagent'

In the Dashboard, it gives the error “This namespace no longer exists and can not be read from or written to. Please try using a different namespace.

It doesn’t matter - all Durable Objects I’m trying to connect to at the same worker are marked as “no longer available” for my Page.

The bindings work if I delete the Page’s wrangler.toml-file and set them up manually through the dashboard. But I can’t get type inferences (my env appears empty to Vite/Remix).

The bindings used to work, but I tried to do some migrations (new DO names etc.), and might accidentally have typed the wrong durable object name for a migration, here’s my wrangler.toml file for the agent worker,

durable_objects.bindings = [
  { name = "MY_DURABLE_OBJECT", class_name = "MyDurableObject"},
  { name = "ATTACHMENTS", class_name = "Attachments"},
  { name = "ERROR_LIST", class_name = "ErrorList"}
]
[[migrations]]
tag = "v1"
new_classes = ["MyDurableObject"]
[[migrations]]
tag = "v1att"
new_classes = ["Attachments"]
[[migrations]]
tag = "v1atterror"
new_classes = ["AttachmentsError"]
[[migrations]]
tag = "v2atterror"
new_classes = ["AttachmentsErrorList"]
deleted_classes = ["AttachmentsError"]
[[migrations]]
tag = "v3"
new_classes = ["ErrorList"]
deleted_classes = ["AttachmentsErrorList"]

But I have also upgraded wrangler to version 3.55.0 and aligned the compatibility_date = "2024-05-02" for all wrangler.toml’s, in hope I’d get worker-to-worker RPC abilities locally and on the edge to no avail. Very cool stuff that’s in the making, though!

I’m able to connect to the DO from another worker, so it could be a Pages-related problem. Any ideas?

I’ve got this issue as well, I’ve managed to build a minimal reproduction for it using create-cloudflare

Uploaded the projects here, if this is just me using durable object bindings wrong let me know but it seems right to me

2 Likes

I ran into this issue as well. My approach to solve it (which didn’t work) was to delete the wrangler.toml file and set up the DO binding manually. Then run wrangler pages download config to see what it should look like.

The generated wrangler.toml file has an (undocumented?) environment property. In any case, committing and pushing the generated wrangler.toml produces the same error (This namespace no longer exists...).

Hi all, thanks for bringing this to our attention! I’m happy to let you know this has been fixed with our latest pages release.

1 Like