{"record":{"id":"09cae3c662e097ea","repo":"DioxusLabs/dioxus","slug":"failed-to-load-wasm-split-module","errorCode":null,"errorMessage":"Failed to load wasm-split module","messagePattern":"Failed to load wasm-split module","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/wasm-split/wasm-split-macro/src/lib.rs","lineNumber":104,"sourceCode":"                fn #load_module_ident (\n                    callback: unsafe extern \"C\" fn(*const ::std::ffi::c_void, bool),\n                    data: *const ::std::ffi::c_void\n                );\n\n                #[allow(improper_ctypes)]\n                #[unsafe(no_mangle)]\n                #import_sig;\n            }\n\n            thread_local! {\n                static #split_loader_ident: wasm_split::LazySplitLoader = unsafe {\n                    wasm_split::LazySplitLoader::new(#load_module_ident)\n                };\n            }\n\n            // Initiate the download by calling the load_module_ident function which will kick-off the loader\n            if !wasm_split::LazySplitLoader::ensure_loaded(&#split_loader_ident).await {\n                panic!(\"Failed to load wasm-split module\");\n            }\n\n            unsafe { #impl_import_ident( #(#args),* ) }.await\n        }\n\n        #[cfg(not(target_arch = \"wasm32\"))]\n        #default_item\n    }\n    .into()\n}\n\n/// Create a lazy loader for a given function. Meant to be used in statics. Designed for libraries to\n/// integrate with.\n///\n/// ```rust, ignore\n/// fn SomeFunction(args: Args) -> Ret {}\n///\n/// static LOADER: wasm_split::LazyLoader<Args, Ret> = lazy_loader!(SomeFunction);","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/wasm-split/wasm-split-macro/src/lib.rs#L86-L122","documentation":"The generated wasm-split loader failed to fetch or instantiate the split wasm module at runtime. The lazy-loaded chunk (emitted as a separate wasm file by the CLI) could not be loaded when the loader was first invoked.","triggerScenarios":"Thrown at packages/wasm-split/wasm-split-macro/src/lib.rs:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The split wasm module could not be loaded. Ensure it was built and is served; check the browser console and network tab."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}