{"record":{"id":"ae9cb002ca1750db","repo":"DioxusLabs/dioxus","slug":"input-path-should-be-valid-utf8","errorCode":null,"errorMessage":"input_path should be valid utf8","messagePattern":"input_path should be valid utf8","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/wasm_bindgen.rs","lineNumber":147,"sourceCode":"            args.push(\"--remove-producers-section\");\n        }\n\n        if self.keep_lld_exports {\n            args.push(\"--keep-lld-exports\");\n        }\n\n        // Out name\n        args.push(\"--out-name\");\n        args.push(&self.out_name);\n\n        // wbg generates typescript bindnings by default - we don't want those\n        args.push(\"--no-typescript\");\n\n        // Out dir\n        let out_dir = self\n            .out_dir\n            .to_str()\n            .expect(\"input_path should be valid utf8\");\n\n        args.push(\"--out-dir\");\n        args.push(out_dir);\n\n        // Input path\n        let input_path = self\n            .input_path\n            .to_str()\n            .expect(\"input_path should be valid utf8\");\n        args.push(input_path);\n\n        tracing::debug!(\"wasm-bindgen: {:#?}\", args);\n\n        // Run bindgen\n        let output = Command::new(binary).args(args).output().await?;\n\n        // Check for errors\n        if !output.stderr.is_empty() {","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/wasm_bindgen.rs#L129-L165","documentation":"`WasmBindgenToBuildRequest::run` converts the wasm-bindgen out_dir to a string for the `--out-dir` argument and `expect`s valid UTF-8. This panic fires when the output directory path contains non-UTF-8 characters, which the CLI argument encoding cannot represent.","triggerScenarios":"Thrown at packages/cli/src/wasm_bindgen.rs:147 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a build/output path that is valid UTF-8; rename directories containing non-UTF-8 bytes in the wasm-bindgen input 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"}