Fetch fails on Node.js (WebAssembly error)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 15/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, nodejs, swift
調査の方向性
The stack trace points into the bundled undici fetch implementation: lazyllhttp in lib/client.js throws WebAssembly is not defined, so the failure is in the Node runtime the app embeds, not in the Swift UI. Start by checking whether that runtime exposes a global WebAssembly object, then run the fetch snippet from the issue to reproduce. Done means await fetch(...) resolves on the device and the process exits without Ctrl+C.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Swift
- スター
- 4k
- フォーク
- 376
- 平均マージ
- 1分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
thebaselab/codeapp のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
thebaselab/codeapp#1356 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
thebaselab/codeapp#1355 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
thebaselab/codeapp#1353 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
thebaselab/codeapp#1350 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
thebaselab/codeapp#1349 ·
thebaselab/codeapp の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
openwatersio/slackwater-ios#976 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
openwatersio/slackwater#591 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
compiler-explorer/compiler-explorer#9738 ·
メンテナーはふだん 2 日以内に返信