-
Notifications
You must be signed in to change notification settings - Fork 525
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
Error: incorrect header check Z_DATA_ERROR #2603
Comments
Can you please set up a simple node server that reproduce the problem? |
|
I don't see a server there, only the fetch client. |
PR welcome |
Sorry, I misread your question. I don't control the server so not sure what exactly they are doing in their response that is causing issues with node fetch / unidici. |
@ronag Thanks, do you mean |
Correct. |
…/GetEntityToken" fails with Error: terminated (issue seems to already be resolved at nodejs/undici#2603) - undici is what node's fetch uses behind the scenes - updating to the latest version of undici fixes the issue Stack trace of the error I was getting: TypeError: terminated at Fetch.onAborted (node:internal/deps/undici/undici:11442:53) at Fetch.emit (node:events:514:28) at Fetch.terminate (node:internal/deps/undici/undici:10695:14) at Fetch.resume (node:internal/deps/undici/undici:11421:36) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { [cause]: Error: incorrect header check at Zlib.zlibOnError [as onerror] (node:zlib:189:17) { errno: -3, code: 'Z_DATA_ERROR' } }
…lready be resolved at nodejs/undici#2603) - undici is what node's fetch uses behind the scenes - updating to the latest version of undici fixes the issue Stack trace of the error I was getting when I sent a POST request to https://test.playfabapi.com/Authentication/GetEntityToken: TypeError: terminated at Fetch.onAborted (node:internal/deps/undici/undici:11442:53) at Fetch.emit (node:events:514:28) at Fetch.terminate (node:internal/deps/undici/undici:10695:14) at Fetch.resume (node:internal/deps/undici/undici:11421:36) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { [cause]: Error: incorrect header check at Zlib.zlibOnError [as onerror] (node:zlib:189:17) { errno: -3, code: 'Z_DATA_ERROR' } }
Bug Description
I am trying to fetch a URL but it fails. It works just fine when I use
node-fetch
,curl
or the native browserfetch
. It's similar to #1271 but there is no redirect happening.These are the response headers:
Reproducible By
Expected Behavior
I would expect the response to log into console
Logs
Instead I get this error:
Environment
Node v20.7.0 and v18.14.2
The text was updated successfully, but these errors were encountered: