Setting DurableObject from wrangler.toml results in an error.

DurableObjects created with CloudflareWorker can be registered with CloudflarePages. However, if I use wrangler pages download config <project-name> to create wrangler.toml and then deploy again, `This namespace no longer exists and can not be read from or written to. Please try using a different namespace.
# Generated by Wrangler on Fri Apr 12 2024 07:46:59 GMT+0900 (Japan Standard Time)
name = "pages"
pages_build_output_dir = ""
compatibility_date = "2024-04-11"


[[durable_objects.bindings]]
name = "SHARE_MESSAGE"
class_name = "ShareMessage"
script_name = "service"

[env.production]
compatibility_date = "2024-04-11"

[[env.production.durable_objects.bindings]]
name = "SHARE_MESSAGE"
class_name = "ShareMessage"
script_name = "service"
# Generated by Wrangler on Fri Apr 12 2024 07:46:59 GMT+0900 (Japan Standard Time)
name = "pages"
pages_build_output_dir = ""
compatibility_date = "2024-04-11"


[[durable_objects.bindings]]
name = "SHARE_MESSAGE"
class_name = "ShareMessage"
script_name = "service"

[env.production]
compatibility_date = "2024-04-11"

[[env.production.durable_objects.bindings]]
name = "SHARE_MESSAGE"
class_name = "ShareMessage"
script_name = "service"
3 Replies
arbfay
arbfay9mo ago
I'm seeing this in the dashboard too.
sadsciencee
sadsciencee6mo ago
@arbfay @なぽりたん did either of you find a solution for this? running into the same issue out of nowhere - was working yesterday, now I'm seeing this in dashboard
naporitan
naporitanOP6mo ago
I found the solution. I needed to add environment = "production".
# Generated by Wrangler on Fri Apr 12 2024 07:46:59 GMT+0900 (Japan Standard Time)
name = "pages"
pages_build_output_dir = ""
compatibility_date = "2024-04-11"


[[durable_objects.bindings]]
name = "SHARE_MESSAGE"
class_name = "ShareMessage"
script_name = "service"
environment = "production"


[env.production]
compatibility_date = "2024-04-11"

[[env.production.durable_objects.bindings]]
name = "SHARE_MESSAGE"
class_name = "ShareMessage"
script_name = "service"
environment = "production"
# Generated by Wrangler on Fri Apr 12 2024 07:46:59 GMT+0900 (Japan Standard Time)
name = "pages"
pages_build_output_dir = ""
compatibility_date = "2024-04-11"


[[durable_objects.bindings]]
name = "SHARE_MESSAGE"
class_name = "ShareMessage"
script_name = "service"
environment = "production"


[env.production]
compatibility_date = "2024-04-11"

[[env.production.durable_objects.bindings]]
name = "SHARE_MESSAGE"
class_name = "ShareMessage"
script_name = "service"
environment = "production"
Want results from more Discord servers?
Add your server