{"record":{"id":"ea50de1f22c1ca3c","repo":"DioxusLabs/dioxus","slug":"failed-to-convert-wasm-bindgen-output-path-to-stri","errorCode":null,"errorMessage":"Failed to convert wasm bindgen output path to string","messagePattern":"Failed to convert wasm bindgen output path to string","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/opt/mod.rs","lineNumber":52,"sourceCode":"}\n\nimpl AppManifest {\n    pub fn new() -> Self {\n        Self {\n            cli_version: crate::VERSION.to_string(),\n            android_artifacts: Default::default(),\n            swift_sources: Default::default(),\n            assets: Default::default(),\n        }\n    }\n\n    /// Manually add an asset to the manifest\n    pub fn register_asset(\n        &mut self,\n        asset_path: &Path,\n        options: manganis::AssetOptions,\n    ) -> anyhow::Result<BundledAsset> {\n        let output_path_str = asset_path.to_str().ok_or(anyhow::anyhow!(\n            \"Failed to convert wasm bindgen output path to string\"\n        ))?;\n\n        let mut bundled_asset =\n            manganis::macro_helpers::create_bundled_asset(output_path_str, options);\n        add_hash_to_asset(&mut bundled_asset);\n\n        self.assets\n            .entry(asset_path.to_path_buf())\n            .or_default()\n            .insert(bundled_asset);\n\n        Ok(bundled_asset)\n    }\n\n    /// Insert an existing bundled asset to the manifest\n    pub fn insert_asset(&mut self, asset: BundledAsset) {\n        let asset_path = asset.absolute_source_path();","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/opt/mod.rs#L34-L70","documentation":"`AppManifest::register_asset` requires the asset path to be valid UTF-8 to embed it in the manifest; it returns this error when the path contains invalid Unicode (possible on some filesystems). The asset path at fault is the `asset_path` argument that `Path::to_str` rejected.","triggerScenarios":"Thrown at packages/cli/src/opt/mod.rs:52 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The wasm-bindgen output path is not valid UTF-8. Use a UTF-8 output path."],"exampleFix":null,"handlingStrategy":"validation","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-23T08:17:48.524Z"}