Closed
Description
Describe the bug
Local error:
@pt_agentos.js?v=634b0a64:20203
GET http://localhost:5173/.vitepress/cache/deps/data:application/wasm;base64,AG…Nlc3NlZC1ieQIGd2FscnVzBjAuMjMuMgx3YXNtLWJpbmRnZW4SMC4yLjk5ICgwNGNhNmYzNGEp 431 (Request Header Fields Too Large)
@pt_agentos.js?v=634b0a64:20160 `WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:
TypeError: Failed to execute 'compile' on 'WebAssembly': HTTP status code is not ok
@pt_agentos.js?v=634b0a64:21255 Failed to initialize Wasm module: CompileError: WebAssembly.instantiate(): BufferSource argument is empty
at q4 (@pt_agentos.js?v=634b0a64:20168:30)
at async d9 (@pt_agentos.js?v=634b0a64:20208:7)
at async r19 (@pt_agentos.js?v=634b0a64:21253:7)
at async Promise.all (index 0)
at async f14 (@pt_agentos.js?v=634b0a64:21259:10)
at async index.mts:70:9
index.mts:71 Uncaught (in promise) CompileError: WebAssembly.instantiate(): BufferSource argument is empty
at q4 (@pt_agentos.js?v=634b0a64:20168:30)
at async d9 (@pt_agentos.js?v=634b0a64:20208:7)
at async r19 (@pt_agentos.js?v=634b0a64:21253:7)
at async Promise.all (index 0)
at async f14 (@pt_agentos.js?v=634b0a64:21259:10)
at async index.mts:70:9
Stackblitz case error:
See url: https://stackblitz.com/edit/vite-6uhev3lw
Reproduction
- Open the browser console.
- Refresh the page
Expected behavior
I hope to solve the issue of Status Code 431 so that Wasm initialization can be successful
System Info
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
Memory: 2.57 GB / 15.89 GB
Binaries:
Node: 20.18.0 - D:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - D:\Program Files\nodejs\yarn.CMD
npm: 10.8.2 - D:\Program Files\nodejs\npm.CMD
pnpm: 9.13.0 - D:\Program Files\nodejs\pnpm.CMD
npmPackages:
vite: 4.5.3 => 4.5.3
vue: ^3.4.38 => 3.4.38
Additional context
When adding the following configuration in the config. mjs file, it still doesn't work.
server: {
headers: {
maxHeaderSize: "20971520",
},
}
No response
Validations
- Check if you're on the latest VitePress version.
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.