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?