You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unable to use undici.fetch in an electron app + webpack config. I did some tests and I get these errors after #1793 . I thought it was a problem with my app, but I tried in a new project without other dependencies (just electron + webpack) and I keep getting these errors.
With a GET request, this is the error:
bundle.js:5767 Uncaught (in promise) TypeError: Failed to execute 'pipeThrough' on 'ReadableStream': Failed to read the 'readable' property from 'ReadableWritablePair': Failed to convert value to 'ReadableStream'.
at dA (bundle.js:5767:40)
at cA (bundle.js:5694:13)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
dA @ bundle.js:5767
cA @ bundle.js:5694
processTicksAndRejections @ node:internal/process/task_queues:96
With a POST request:
bundle.js:1451 Uncaught (in promise) TypeError: fetch failed
at A.exports.fetch (bundle.js:1451:21)
at async bundle.js:9562:14
GET requests proceed but POST do not.
Could it be a webpack problem or something else with my setup? If I use undici.fetch without any dependencies then everything is good.
Reproducible By
As mentioned before, I was able to reproduce it in a new project with a basic webpack configuration to divide the main and renderer process. Everything I tried was done in the renderer process. This is the script used:
Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.
I've done some more tests, webpack has nothing to do with it, it seems to be electron. I've used undici.fetch in the main process of electron and no errors, but is causing issues in the renderer process.
Unsure if I still have to give the steps to reproduce, since I think the problem is electron. I think I'll have to use undici.fetch in the main process.
Bug Description
I'm unable to use
undici.fetch
in an electron app + webpack config. I did some tests and I get these errors after #1793 . I thought it was a problem with my app, but I tried in a new project without other dependencies (just electron + webpack) and I keep getting these errors.With a GET request, this is the error:
With a POST request:
GET requests proceed but POST do not.
Could it be a webpack problem or something else with my setup? If I use
undici.fetch
without any dependencies then everything is good.Reproducible By
As mentioned before, I was able to reproduce it in a new project with a basic webpack configuration to divide the main and renderer process. Everything I tried was done in the renderer process. This is the script used:
With v5.13.0 you receive the response in output, but not with v5.14.0.
Expected Behavior
Use
undici.fetch
in electron + webpack, as before in v5.13.0.Logs & Screenshots
Environment
Windows 11 Pro 22621.963, Node v19.3.0
The text was updated successfully, but these errors were encountered: