Durable Object '503 Service Unavailable'
I have developed a Pages application that connects to a Durable Object via a Pages Function. This all used to work as of 2 or 3 months ago. When I came back from my break and upgraded wrangler yesterday, the function is no longer able to connect to the DO on my local server.
1. When I run the pages function is says that the durable object is 'not connected'
2. When I start a browser I get a '503 Service Unavailable'
I have defined my durable object in a worker with a .toml file with:
name = "decision-do-dev"
[durable_objects]
bindings = [ { name="DECISION_DO", class_name="DecisionDO" } ]
I run this separately on a terminal with npx wrangler pages dev
I then run my pages application with npx wrangler pages dev [directory] --do=DECISION_DO=DecisionDO@decision-do-dev
I open the durable object with the following code in the function:
const id = this.context.env.DECISION_DO.idFromString("id-string-looked-up");
const stub = this.context.env.DECISION_DO.get(doId);
const doResponse = await stub.fetch(this.context.request);
doResponse comes back with status 503 Service Unavailable.
Any thoughts on what may have changed?
1 Reply
If I install Wrangler version 3.87.0, things work. If I install Wrangler 3.88.0 things break.
I am guessing the following update may have an impact:
Updates to miniflare and @cloudflare/workers-shared:
Dependency Updates: Upgraded miniflare to version 3.20241106.0 and @cloudflare/workers-shared to version 0.7.1.
When I look at Wrangler package.json, I see that workered is 1.20241106.1 but miniflare 3.20241106.0. If we focus on the 20241106.x we see that the x for workered is 1 and for miniflare is 0. Is this possibly the source of the error?