Zackriya-Solutions/meetily · error
Invalid temp path (non-UTF8)
Error message
Invalid temp path (non-UTF8)
What it means
The same Path::to_str() UTF-8 conversion, applied to the generated temporary WAV path. The temp filename itself is pure ASCII (.meetily_decode_<random>.wav), so in practice this fires when the input file's parent directory contains non-UTF-8 bytes, making the joined temp path non-UTF-8 as well. It shares its root cause and remedy with 'Invalid input path (non-UTF8)'.
Source
Thrown at frontend/src-tauri/src/audio/decoder.rs:320
"Converting .{} to temporary WAV via ffmpeg: {} -> {}",
input_path
.extension()
.and_then(|e| e.to_str())
.unwrap_or("unknown"),
input_path.display(),
temp_path.display()
);
if let Some(cb) = progress_callback {
cb(0, "Converting audio format with FFmpeg...");
}
let input_str = input_path
.to_str()
.ok_or_else(|| anyhow!("Invalid input path (non-UTF8)"))?;
let output_str = temp_path
.to_str()
.ok_or_else(|| anyhow!("Invalid temp path (non-UTF8)"))?;
let mut command = Command::new(&ffmpeg_path);
command
.args([
"-i", input_str,
"-vn", // Strip video tracks
"-acodec", "pcm_s16le", // Output PCM WAV (Symphonia handles natively)
"-y", // Overwrite without prompt
output_str,
])
.stdin(Stdio::null())
.stdout(Stdio::piped())
.stderr(Stdio::piped());
// Hide console window on Windows
#[cfg(target_os = "windows")]
{
use std::os::windows::process::CommandExt;View on GitHub (pinned to 0281737d87)
Solutions
- Move or rename the input file into a UTF-8-named directory and re-import.
- Code fix: create the conversion temp under std::env::temp_dir() when the input's parent is non-UTF-8 (see exampleFix).
- Validate the picked path for UTF-8 round-tripping at selection time and warn early.
Example fix
// before
let temp_file = tempfile::Builder::new()
.prefix(".meetily_decode_").suffix(".wav")
.tempfile_in(parent_dir)?;
// after — prefer a guaranteed-UTF-8 dir when the input's parent is not
let dir = if parent_dir.to_str().is_some() {
parent_dir
} else {
std::env::temp_dir().as_path()
};
let temp_file = tempfile::Builder::new()
.prefix(".meetily_decode_").suffix(".wav")
.tempfile_in(dir)?; Defensive patterns
Strategy: validation
Validate before calling
// Rust — when the input's parent is non-UTF-8, decode from a copied ASCII-safe path
let work_path = if path.to_str().is_some() { path.to_path_buf() } else { copy_to_temp(path)? };
let temp_file = tempfile::Builder::new().prefix(".meetily_decode_").suffix(".wav")
.tempfile_in(work_path.parent().unwrap_or(Path::new(".")))?; Try / catch
// identical remedy to 'Invalid input path (non-UTF8)': rename/move the source directory or decode from an ASCII-safe copy
Prevention
- Create the conversion temp in a guaranteed-UTF-8 directory when the input's parent is not.
- Keep generated temp names ASCII (the .meetily_decode_ prefix already is).
When it happens
Trigger: Any import where the source directory has non-UTF-8 bytes in its name — the temp file is created in that directory specifically to stay on the same filesystem, inheriting the encoding problem.
Common situations: Importing from a folder named with legacy codepage characters (Windows) or raw byte names (Linux); the input path itself usually fails first with the sibling error.
Related errors
- Invalid input path (non-UTF8)
- Failed to create temporary WAV file: {}
- No audio samples decoded from file
- File does not exist: {}
- Unsupported format: .{}. Supported: {}
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/26ec8cb17dd044f7.
Report an issue: GitHub.