-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: requests from workers to DOs (in miniflare) broken in wrangler 3.46+ #5658
Comments
I've further narrowed this to 3.46.0 and verified that 3.45.0 does not reproduce the issue. |
Looking at the release diff, there's really only one related change that is mentioned both under patch and minor: #5215 This seems a likely candidate but unfortunately is quite large. At first blush the changes to |
Thanks for the issue @jesseditson 😄 (and thanks a lot for the high quality minimal reproduction!!! that's always super helpful and appreciated! ❤️) This is something that I've already noticed in the context of I've just opened #5669 to address this, I've tried it with your minimal reproduction and it does seem to be fixing the issue, but if you want please feel free to also try the PR's prerelease and let me know if it works for you 🙂 |
Awesome, thanks for your work here! Appreciate you and the CF team! |
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: