web端会调用两次libpag.wasm的加载 #3275
Answered
by
jinwuwu001
donghao123456
asked this question in
Q&A
-
|
Beta Was this translation helpful? Give feedback.
Answered by
jinwuwu001
Feb 26, 2026
Replies: 1 comment 2 replies
-
|
可以打开浏览器 DevTools 的 Network 面板,看第一次 wasm 请求的 Response Headers 中 Content-Type 是什么。如果不是 application/wasm,则需要配置正确的 Content-Type,若 Content-Type 没问题,可检查浏览器 console 是否有报错,若没报错可提供一份可复现问题的 dmeo,该问题我本地没复现到 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



该错误明确说了 MIME Type 不对,回退到 ArrayBuffer instantiation,所以加载了两次 wasm(是响应头参数错误导致 WebAssembly 的错误处理机制生效,不是 libpag 有问题)
可以检查下响应头中的 Content-Type 是否正确,若不正确,在服务器/CDN 上,让它对 .wasm 文件返回 Content-Type: application/wasm
若响应头中 Content-Type 是正确的,对于第一个 libpag.wasm 请求,截图 Response Headers 的完整内容发出来,同时也可提供 demo 用于复现问题