TypeError: fetch failed
See original GitHub issueBug Description
Fetch throws ‘TypeError: fetch failed’ when posting
Reproducible By
Request with private production credentials to ERP
Expected Behavior
Successful response (ok). node-fetch
works just fine.
Logs & Screenshots
TypeError: fetch failed
at Object.processResponse (C:\Users\kyryl\dev\entriwise\server\node_modules\undici\lib\fetch\index.js:183:23)
at Fetch.fetchFinale (C:\Users\kyryl\dev\entriwise\server\node_modules\undici\lib\fetch\index.js:937:17)
at Fetch.mainFetch (C:\Users\kyryl\dev\entriwise\server\node_modules\undici\lib\fetch\index.js:744:17)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Environment
Linux and Windows, v17.5 v17.6
Additional context
Request takes up to several minutes until response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:33 (25 by maintainers)
Top Results From Across the Web
Getting "TypeError: Failed to fetch" when the request hasn't ...
Check the value of Access-Control-Allow-Origin in the response headers. Usually fetch API will throw fail to fetch even after receiving a ...
Read more >TypeError: Failed to fetch and CORS in JavaScript | bobbyhadz
TypeError : Failed to fetch and CORS in JavaScript # · An incorrect or incomplete URL has been passed to the fetch() method....
Read more >Undocumented TypeError: Failed to fetch
I have to go to console , hit the URL appear then click on "advanced" in the browser > then click on "process"...
Read more >Type Error: Failed to Fetch when using Fetch API - JavaScript
fetch will reject with a TypeError when a network error is encountered. Check you are running the json server correctly and that it...
Read more >What do I do if "TypeError: Failed to fetch" is displayed when I ...
Object Storage Service:What do I do if "TypeError: Failed to fetch" is displayed when I use a browser to access a bucket or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Maybe this can help?
I am experiencing the same with a Firebase Emulators host.
In one terminal:
In another:
Added: Once
npm run start
is running, you can exercise the server by:Trying with
127.0.0.1
instead oflocalhost
puts the problem at rest:@ronag I’m still having these errors. Cannot use undici fetch at all. Here is updated trace from Node v18:
@ronag Could you re-open or reply to my emails?