-
Notifications
You must be signed in to change notification settings - Fork 299
Open
Description
What Happened:
I was unable to use await fetch() nor fetch().then() on Node.js for this application.
Version this happens on:
The latest version available on the App Store & The Beta TestFlight
How to re-create
- Create a file called
test.js - Write down this code:
await fetch("https://jsonplaceholder.typicode.com/posts/1"); // Use any API- Execute the file. You may need to allow ESM modules.
Error Dump
Solution 1 $ node /var/mobile/Containers/Data/Application/A3048ECB-6A9D-46F6-AC58-CDC31F18DB0B/Documents/node/Solutions/Solution 1/test.js
ReferenceError: WebAssembly is not defined
at lazyllhttp (node:internal/deps/undici/undici:7804:9)
at lib/client.js (node:internal/deps/undici/undici:7850:25)
at __require (node:internal/deps/undici/undici:6:50)
at lib/pool.js (node:internal/deps/undici/undici:9173:18)
at __require (node:internal/deps/undici/undici:6:50)
at lib/agent.js (node:internal/deps/undici/undici:9255:16)
at __require (node:internal/deps/undici/undici:6:50)
at lib/global.js (node:internal/deps/undici/undici:9376:17)
at __require (node:internal/deps/undici/undici:6:50)
at lib/fetch/index.js (node:internal/deps/undici/undici:9464:35)
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11730:11)
at async file:///private/var/mobile/Containers/Data/Application/A3048ECB-6A9D-46F6-AC58-CDC31F18DB0B/Documents/node/Solutions/Solution%201/test.js:1:1 {
cause: ReferenceError: WebAssembly is not defined
at lazyllhttp (node:internal/deps/undici/undici:7804:9)
at lib/client.js (node:internal/deps/undici/undici:7850:25)
at __require (node:internal/deps/undici/undici:6:50)
at lib/pool.js (node:internal/deps/undici/undici:9173:18)
at __require (node:internal/deps/undici/undici:6:50)
at lib/agent.js (node:internal/deps/undici/undici:9255:16)
at __require (node:internal/deps/undici/undici:6:50)
at lib/global.js (node:internal/deps/undici/undici:9376:17)
at __require (node:internal/deps/undici/undici:6:50)
at lib/fetch/index.js (node:internal/deps/undici/undici:9464:35)
}
- The code will not execute properly. Depending on how it is written, it will either gracefully handle the
fetchor error out. - A pattern I discovered is that you had to press the
CTRL+Cto quit the application, meaning that Node.js doesn’t quit.
Metadata
Metadata
Assignees
Labels
No labels