-
Notifications
You must be signed in to change notification settings - Fork 757
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: Better error logging in wrangler dev proxy logic #2244
Comments
note: this also applies to SSL issues that i'm having. |
Sorry @nevikashah I read it wrong 😅 |
You're a faster debugger than I. Man, this just cost me 3-4 DAYS. Cloudflare gang, please fix this. In addition to a good error message it would be great to let the developer specify that the name of the host they want to listen to. The error message should probably document that if you're using Node.js 17+, the process listening on the proxy port should probably listen on an IPv6 host like |
I'm running into this issue trying to run a local pages environment for a Hugo site. Would it not be reasonable to have the CLI request |
What version of
Wrangler
are you using?2.4.2
What operating system are you using?
Mac
Describe the Bug
When using
wrangler pages dev
with the--proxy=PORT
option, node, due to the resolution of localhost, will attempt to send this request to the ipv6 loopback address on node17+.If a developer has their proxy frontend only listening on ipv4, the cloudflare worker will simply print
[pages:err] Error: Could not proxy request: TypeError: fetch failed
This just cost me a good 2-3 hours thinking something was wrong with my webpack server. For future developers, a more verbose error message / allow us to specify the host of the proxy would be helpful here: https://github.com/cloudflare/wrangler2/blob/main/packages/wrangler/src/miniflare-cli/assets.ts#L42
The text was updated successfully, but these errors were encountered: