Zackriya-Solutions/meetily · error · anyhow::Error
Failed to create models directory: {}
Error message
Failed to create models directory: {} What it means
Before downloading, the engine runs tokio fs::create_dir_all on the configured models directory; this error means directory creation failed and the appended OS error explains why. No download starts. Typical errnos are PermissionDenied on the parent path or a read-only filesystem.
Source
Thrown at frontend/src-tauri/src/whisper_engine/whisper_engine.rs:955
"medium-q5_0" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-medium-q5_0.bin",
"large-v3-turbo-q5_0" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo-q5_0.bin",
"large-v3-q5_0" => "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-q5_0.bin",
_ => return Err(anyhow!("Unsupported model: {}", model_name))
};
log::info!("Model URL for {}: {}", model_name, model_url);
// Generate correct filename - all models follow ggml-{model_name}.bin pattern
let filename = format!("ggml-{}.bin", model_name);
let file_path = self.models_dir.join(&filename);
log::info!("Downloading to file path: {}", file_path.display());
// Create models directory if it doesn't exist
if !self.models_dir.exists() {
fs::create_dir_all(&self.models_dir).await
.map_err(|e| anyhow!("Failed to create models directory: {}", e))?;
}
// Update model status to downloading
{
let mut models = self.available_models.write().await;
if let Some(model_info) = models.get_mut(model_name) {
model_info.status = ModelStatus::Downloading { progress: 0 };
}
}
log::info!("Creating HTTP client and starting request...");
let client = Client::new();
log::info!("Sending GET request to: {}", model_url);
let response = client.get(model_url).send().await
.map_err(|e| anyhow!("Failed to start download: {}", e))?;
log::info!("Received response with status: {}", response.status());View on GitHub (pinned to 0281737d87)
Solutions
- Create the models directory manually and verify the app user can write to it (touch a file there)
- Check ownership and permissions on every parent path of the models directory
- For packaged/sandboxed builds, confirm the filesystem write entitlement covers the app-data directory
Defensive patterns
Strategy: validation
Validate before calling
// Rust: probe writability before download
async fn models_dir_writable(dir: &Path) -> bool {
std::fs::create_dir_all(dir).is_ok()
&& std::fs::write(dir.join(".probe"), b"").is_ok()
&& std::fs::remove_file(dir.join(".probe")).is_ok()
} Try / catch
try {
await invoke('download_model', { modelName });
} catch (e) {
if (String(e).includes('Failed to create models directory')) {
showSetupHelp('Check permissions on the app-data models folder');
} else { throw e; }
} Prevention
- Create and probe the models directory during app onboarding, not at first download
- For packaged builds, verify sandbox entitlements grant write access to the app-data path
- Log the resolved models_dir path at startup so permission issues are diagnosable
When it happens
Trigger: Models directory (app-data dir, e.g. ~/Library/Application Support/Meetily/models or %APPDATA%\Meetily\models) is inside a location the process cannot write; a regular file exists at the directory path; sandboxed build without filesystem write entitlements.
Common situations: Corporate lockdown of user profile directories; running the app from a read-only install location; macOS sandbox entitlements missing after packaging changes; models dir redirected to an unmounted volume.
Related errors
- Failed to delete file '{}': {}
- Model {} is corrupted and cannot be loaded
- Failed to create file: {}
- Cannot read file: {}
- Whisper transcription failed on segment {}: {}
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/0d317e5fb88440f8.
Report an issue: GitHub.