tonhowtf/omniget · error
o yt-dlp não iniciou
Error message
o yt-dlp não iniciou: {} What it means
run_ytdlp spawns the yt-dlp binary with .output(); if the OS fails to spawn the process (binary exists but is not executable, corrupted, or architecture-incompatible), it throws "o yt-dlp não iniciou: {}" wrapping the io::Error. This differs from yt-dlp running and failing — the process never started.
Solutions
- chmod +x the yt-dlp binary (or re-download it via the dependency manager).
- Run `yt-dlp --version` directly to see the underlying OS error.
- Reinstall yt-dlp for the correct platform/architecture.
- Check antivirus/quarantine logs if the binary disappeared or became non-executable.
Example fix
// before
let out = run_ytdlp(&args).await?;
// after
match run_ytdlp(&args).await {
Ok(out) => println!("{}", out),
Err(e) if e.to_string().contains("não iniciou") => {
eprintln!("binário yt-dlp quebrado/sem permissão: {e}; reinstale-o");
}
Err(e) => return Err(e),
} Defensive patterns
Strategy: validation
Validate before calling
// antes de chamar
let path = find_tool("yt-dlp").await.ok_or(anyhow!("yt-dlp ausente"))?;
let meta = std::fs::metadata(&path)?;
#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;
if meta.permissions().mode() & 0o111 == 0 {
return Err(anyhow!("yt-dlp sem permissão de execução: {}", path.display()));
}
} Try / catch
match run_ytdlp(&args).await {
Ok(out) => out,
Err(e) if e.to_string().contains("não iniciou") => {
eprintln!("falha ao spawnar yt-dlp ({e}); reinstale o binário");
reinstall_ytdlp().await?;
run_ytdlp(&args).await?
}
Err(e) => return Err(e),
} Prevention
- chmod +x the binary after manual downloads
- Verify binaries with `yt-dlp --version` after install or update
- Download platform-correct binaries (linux/mac/win, right arch)
- Re-download if the managed tool directory was partially written
When it happens
Trigger: Calling enumerate (via run_ytdlp) when the yt-dlp binary found on disk lacks execute permission, is a broken symlink, or is built for a different platform.
Common situations: Downloaded binary without chmod +x; partial/corrupted download of the managed tool; Windows-only binary run on Linux via mismatched install; antivirus quarantining the binary.
Related errors
- ffmpeg nao iniciou
- ffmpeg nao iniciou
- não foi possível iniciar o gallery-dl
- não foi possível iniciar o yt-dlp
- não foi possível iniciar o yt-dlp
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/ca338fe27fe8d82b.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/yt_archive.rs:68
}
}
}
async fn ytdlp_path() -> anyhow::Result<PathBuf> {
crate::core::dependencies::find_tool("yt-dlp")
.await
.ok_or_else(|| anyhow!("o yt-dlp não está instalado"))
}
/// Roda o yt-dlp e devolve a saída padrão. Erro traz o fim do stderr.
pub async fn run_ytdlp(args: &[String]) -> anyhow::Result<String> {
let bin = ytdlp_path().await?;
let out = crate::core::ytdlp::ytdlp_command(&bin)
.args(args)
.stdin(std::process::Stdio::null())
.output()
.await
.map_err(|e| anyhow!("o yt-dlp não iniciou: {}", e))?;
if !out.status.success() {
let err = String::from_utf8_lossy(&out.stderr);
let tail: Vec<&str> = err.lines().rev().take(3).collect();
return Err(anyhow!(
"yt-dlp falhou: {}",
tail.into_iter().rev().collect::<Vec<_>>().join(" / ")
));
}
Ok(String::from_utf8_lossy(&out.stdout).to_string())
}
// ── Estado ─────────────────────────────────────────────────────────────
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum ItemStatus {
/// Ainda na fila.
Pending,View on GitHub (pinned to 8600b91f42)