{"record":{"id":"0cfb6c831e9114fc","repo":"perspective-dev/perspective","slug":"stage-0-wasm-loading-failed-skipping","errorCode":null,"errorMessage":"Stage 0 wasm loading failed, skipping","messagePattern":"Stage 0 wasm loading failed, skipping","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/perspective-js/src/ts/wasm/decompress.ts","lineNumber":61,"sourceCode":"        return buffer as Module;\n    }\n}\n\nexport async function load_wasm_stage_0(\n    wasm:\n        | ArrayBuffer\n        | Response\n        | WebAssembly.Module\n        | (() => Promise<ArrayBuffer>),\n): Promise<Uint8Array> {\n    if (wasm instanceof Function) {\n        wasm = await wasm();\n    }\n\n    try {\n        return await extract(wasm as ArrayBuffer);\n    } catch (e) {\n        console.warn(\"Stage 0 wasm loading failed, skipping\");\n        return new Uint8Array(wasm as ArrayBuffer);\n    }\n}\n","sourceCodeStart":43,"sourceCodeEnd":65,"githubUrl":"https://github.com/perspective-dev/perspective/blob/11c8238c0c9c0b9e490b5a6a2dc277afad1e980a/rust/perspective-js/src/ts/wasm/decompress.ts#L43-L65","documentation":"Warning in the wasm stage-0 loader: decompressing the provided wasm (extracting the embedded uncompressed payload) failed, so the loader logs this and returns the raw wasm bytes as-is. Stage 0 is an optimization; its failure is non-fatal and the original (larger) wasm is used unchanged.","triggerScenarios":"Thrown at rust/perspective-js/src/ts/wasm/decompress.ts:61 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the caught error for corruption or truncation of the wasm asset","Verify the served .wasm file has correct Content-Type and is not HTML from an error page","Check that no proxy/CDN mangles or re-encodes the binary response","Accept the warning if functionality is normal — only payload size/load time is affected"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"11c8238c0c9c0b9e490b5a6a2dc277afad1e980a","analyzedAt":"2026-09-09T00:35:19.377Z","contentChangedAt":"2026-09-09T00:35:19.377Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}