-
Notifications
You must be signed in to change notification settings - Fork 665
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: wrangler pages dev, trying to start localhost:8788 crashes #3408
Comments
Tried Wrangler 3.1.0 and got same error message with different hex numbers. |
FYI: with Wrangler 2.17.0, as soon as I type localhost:8788, but before even pressing enter, there seems to be a prefetch and I get the following lines on the terminal: GET / 200 OK (30.80ms) |
RE: Github repository: https://github.com/safaalai/stencil-latest To reproduce:
{
"compilerOptions": {
..... (lots of settings),
"skipLibCheck": true
},
....
}
You should now see the crash |
Hey! 👋 Apologies for the delayed response. Thank you for raising this and including a detailed reproduction. 😃 I'm able to reproduce this. It looks the Stencil dev sever is sending gzipped responses with the |
Did some more digging, and looks like we're blocked on nodejs/undici#2159 if we want to fix this for when |
Thank you. This sounds great. Will look here to see when I can try it. Let me know if you need anything from me or suggest I try something. |
Previously, if the response from a custom service included a `Content-Encoding` header, we would respond with decoded content to `workerd` without removing the `Content-Encoding` header. This caused `workerd` to try to decode already decoded content, resulting in an error. This was particularly a problem with `wrangler pages dev`, as upstream dev servers could very easily return gzipped content. This change updates the `writeResponse()` function with code from Miniflare 2, to re-encode the body before responding. Note, due to a fixed but unreleased bug in `undici` (nodejs/undici#2159), defining a custom service that directly proxies somewhere else with `fetch()` like `wrangler pages dev` will fail, if `Content-Encoding` contains multiple encodings. Closes cloudflare/workers-sdk#3408
Previously, if the response from a custom service included a `Content-Encoding` header, we would respond with decoded content to `workerd` without removing the `Content-Encoding` header. This caused `workerd` to try to decode already decoded content, resulting in an error. This was particularly a problem with `wrangler pages dev`, as upstream dev servers could very easily return gzipped content. This change updates the `writeResponse()` function with code from Miniflare 2, to re-encode the body before responding. Note, due to a fixed but unreleased bug in `undici` (nodejs/undici#2159), defining a custom service that directly proxies somewhere else with `fetch()` like `wrangler pages dev` will fail, if `Content-Encoding` contains multiple encodings. Closes cloudflare/workers-sdk#3408
This crash no longer happens as of 3.1.2. Please let me know if you wish me to close the bug. |
I had the same issue and I confirm it's fixed with 3.1.2. Thanks a lot! |
looks like this is no longer an issue so closing this out :) please feel free to re-open if the issue comes up again! |
Previously, if the response from a custom service included a `Content-Encoding` header, we would respond with decoded content to `workerd` without removing the `Content-Encoding` header. This caused `workerd` to try to decode already decoded content, resulting in an error. This was particularly a problem with `wrangler pages dev`, as upstream dev servers could very easily return gzipped content. This change updates the `writeResponse()` function with code from Miniflare 2, to re-encode the body before responding. Note, due to a fixed but unreleased bug in `undici` (nodejs/undici#2159), defining a custom service that directly proxies somewhere else with `fetch()` like `wrangler pages dev` will fail, if `Content-Encoding` contains multiple encodings. Closes #3408
Previously, if the response from a custom service included a `Content-Encoding` header, we would respond with decoded content to `workerd` without removing the `Content-Encoding` header. This caused `workerd` to try to decode already decoded content, resulting in an error. This was particularly a problem with `wrangler pages dev`, as upstream dev servers could very easily return gzipped content. This change updates the `writeResponse()` function with code from Miniflare 2, to re-encode the body before responding. Note, due to a fixed but unreleased bug in `undici` (nodejs/undici#2159), defining a custom service that directly proxies somewhere else with `fetch()` like `wrangler pages dev` will fail, if `Content-Encoding` contains multiple encodings. Closes #3408
Previously, if the response from a custom service included a `Content-Encoding` header, we would respond with decoded content to `workerd` without removing the `Content-Encoding` header. This caused `workerd` to try to decode already decoded content, resulting in an error. This was particularly a problem with `wrangler pages dev`, as upstream dev servers could very easily return gzipped content. This change updates the `writeResponse()` function with code from Miniflare 2, to re-encode the body before responding. Note, due to a fixed but unreleased bug in `undici` (nodejs/undici#2159), defining a custom service that directly proxies somewhere else with `fetch()` like `wrangler pages dev` will fail, if `Content-Encoding` contains multiple encodings. Closes #3408
Previously, if the response from a custom service included a `Content-Encoding` header, we would respond with decoded content to `workerd` without removing the `Content-Encoding` header. This caused `workerd` to try to decode already decoded content, resulting in an error. This was particularly a problem with `wrangler pages dev`, as upstream dev servers could very easily return gzipped content. This change updates the `writeResponse()` function with code from Miniflare 2, to re-encode the body before responding. Note, due to a fixed but unreleased bug in `undici` (nodejs/undici#2159), defining a custom service that directly proxies somewhere else with `fetch()` like `wrangler pages dev` will fail, if `Content-Encoding` contains multiple encodings. Closes #3408
Which Cloudflare product(s) does this pertain to?
Pages, Wrangler
What version of
Wrangler
are you using?3.0.1
What operating system are you using?
Mac OS 13.2.1
Describe the Bug
*** Fatal uncaught kj::Exception: kj/compat/gzip.c++:80: failed: header = gzip decompression failed; ctx.msg = incorrect header check stack: 1031bf4d7 1031bf6a3 102ce3fbc 102ce3ce6 10444e7cf 10300d46d 102f51245 102f51462 104419d0d 102df1a0d 10441995f 104419cf3 102c9b45d 10441995f 10441adb4 10441b601 104418677 10294549b 1029451e4 1029451cc 10449b997 10449bac9 104499a9f 102937113 /usr/lib/dyld@630f
At this point browser tab is unresponsive and nothing else can be done. No part of my code was invoked before the crash.
My code does nothing with gzip. I believe gzip is invoked by the OS as it tries to decompress /usr/lib/dyld. dyld is a system file and cannot be deleted.
Everything was working fine with previous versions of Wrangler.
The text was updated successfully, but these errors were encountered: