{"record":{"id":"8c16b6625233bb29","repo":"tauri-apps/tauri","slug":"failed-to-read-binary-path","errorCode":null,"errorMessage":"failed to read binary path","messagePattern":"failed to read binary path","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-bundler/src/bundle/windows/msi/mod.rs","lineNumber":953,"sourceCode":"    binaries.push(Binary {\n      guid: Uuid::new_v4().to_string(),\n      path: dest\n        .into_os_string()\n        .into_string()\n        .expect(\"failed to read external binary path\"),\n      id: wix_identifier(&dest_filename),\n    });\n  }\n\n  for bin in settings.binaries() {\n    if !bin.main() {\n      binaries.push(Binary {\n        guid: Uuid::new_v4().to_string(),\n        path: settings\n          .binary_path(bin)\n          .into_os_string()\n          .into_string()\n          .expect(\"failed to read binary path\"),\n        id: wix_identifier(bin.name()),\n      })\n    }\n  }\n\n  Ok(binaries)\n}\n\n#[derive(Serialize)]\nstruct MergeModule {\n  name: String,\n  path: String,\n}\n\nfn get_merge_modules(settings: &Settings) -> crate::Result<Vec<MergeModule>> {\n  let mut merge_modules = Vec::new();\n  let regex = Regex::new(r\"[^\\w\\d\\.]\")?;\n  for msm in glob::glob(","sourceCodeStart":935,"sourceCodeEnd":971,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-bundler/src/bundle/windows/msi/mod.rs#L935-L971","documentation":"For every non-main [[bin]] binary in the project, the MSI bundler converts its built path to a UTF-8 String for the WiX data. into_string() fails when that path (target directory plus binary name) contains non-UTF-8 bytes.","triggerScenarios":"MSI bundling a crate that declares extra [[bin]] targets while the project or target path contains non-UTF-8 bytes — a legacy-encoded checkout directory on Unix, or unpaired-surrogate path segments on Windows.","commonSituations":"Projects checked out under user directories with non-UTF-8 names; locale-mangled folder names; usually appears together with the temp-path variant (error 176).","solutions":["Move or clone the project to an all-ASCII path (e.g. C:\\src\\app) and rebuild","Rename the offending non-UTF-8 path component","On Windows, also set TMP/TEMP to an ASCII directory as a precaution"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before MSI bundling a multi-bin crate, confirm the target path is UTF-8\nlet out = std::path::Path::new(env!(\"CARGO_TARGET_DIR\"));\nif out.to_str().is_none() {\n  eprintln!(\"project/target path is not valid UTF-8 — move the project to an ASCII path\");\n  std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check out projects into all-ASCII directories on build machines","Rename any non-UTF-8 path components in the build root","Keep TMP/TEMP ASCII as well — this error often co-occurs with the temp-path variant"],"tags":["windows","msi","binary","utf-8","path","tauri-bundler"],"backgroundTag":"non-utf8-path","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}