Skip to content

431 Request Header Fields Too Large #4636

Closed
@liu-huitao

Description

@liu-huitao

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

Image

Image

Image

Stackblitz case error:

See url: https://stackblitz.com/edit/vite-6uhev3lw

Image

Image

Reproduction

  1. Open the browser console.
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamRelated to the dependencies

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions