馃悰 BUG: requests from workers to DOs (in miniflare) broken in wrangler 3.46+ #5658
Labels
bug
Something that isn't working
regression
Break in existing functionality as a result of a recent change
wrangler
Relating to the Wrangler CLI tool
Which Cloudflare product(s) does this pertain to?
Wrangler core, Miniflare
What version(s) of the tool(s) are you using?
3.51.2 [wrangler]
What version of Node are you using?
v18.19.0
What operating system and version are you using?
Mac OS Sonoma 14.4.1
Describe the Bug
Expected behavior
The behavior I expect is:
Observed behavior
Instead, when I make a request from worker B, the request does not reach the DO class, and instead I see an exception:
Steps to reproduce
I've posted a minimal repro repo here: https://github.com/jesseditson/wrangler-do-error-repro
To set it up, clone the repo then run
npm install
.To reproduce the issue, run (in two seperate terminals)
npm run do
npm run api
Then visit
http://localhost:8777/test
in a browser or runcurl http://localhost:8777/test
Investigation
Looking at the actual entry.worker.js, it looks like some headers are auto-injected - when I log the request path and headers, the offending call has:
The
x-miniflare-durable-object-cf-blob
appears to be the issue, and sure enough when I add a line before the request:request.headers.delete("x-miniflare-durable-object-cf-blob")
things work as expected.
Resolution
I've verified that this is a regression by running
npm i --save-dev wrangler@3.45
in the posted repro, which then no longer reproduces this error.I have not yet looked into the patches merged between .45 and .51, but it also seems possible that the error exists outside this repo, as I can't grep any reads of the
x-miniflare-durable-object-cf-blob
header.Please provide a link to a minimal reproduction
https://github.com/jesseditson/wrangler-do-error-repro
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: