tonhowtf/omniget · error

yt-dlp process failed

Error message

yt-dlp process failed: {}

What it means

Raised when the async `child.wait()` on the yt-dlp process itself fails — i.e. the OS-level wait errored rather than yt-dlp exiting with a nonzero code. This is not a yt-dlp extraction failure; it means the runtime could not reap or communicate with the child process.

Solutions

  1. Retry the download; transient wait errors usually disappear on a fresh spawn.
  2. Check system logs (dmesg/journalctl) for OOM-killer or signal kills of yt-dlp.
  3. Free memory / close other apps if OOM is implicated.
  4. Update the app and yt-dlp to current versions.
Defensive patterns

Strategy: try-catch

Try / catch

let status = match child.wait().await {
    Ok(s) => s,
    Err(e) => {
        tracing::warn!("wait() failed (child killed externally?): {e}");
        return Err(anyhow!("yt-dlp process failed: {}", e));
    }
};

Prevention

When it happens

Trigger: tokio::select! branch at ytdlp.rs:3508 where `child.wait()` returns Err — child process killed by a signal outside the app's control, PID recycled/invalid, or tokio runtime I/O driver issues.

Common situations: The yt-dlp process was killed by the OOM killer or an external tool; system resource exhaustion; corrupted process state after system suspend/resume during a long download.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/ebb8bebdaddd0c8a. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/ytdlp.rs:3508

            let stderr_buf = BufReader::new(stderr_pipe);
            let mut stderr_lines = stderr_buf.lines();
            let mut first = true;
            while let Ok(Some(line)) = stderr_lines.next_line().await {
                if first {
                    first = false;
                    release_boot_slot(&stderr_boot_slot);
                }
                if let Some(id) = stderr_log_id {
                    log_hook::emit_log(id, &line);
                }
                buf.push_str(&line);
                buf.push('\n');
            }
            buf
        });

        let status = tokio::select! {
            s = child.wait() => s.map_err(|e| anyhow!("yt-dlp process failed: {}", e))?,
            _ = cancel_token.cancelled() => {
                let _ = child.kill().await;
                if let Some(download_id) = registered_download_id {
                    unregister_download_process(download_id);
                }
                let _ = line_reader.await;
                let _ = stderr_reader.await;
                cleanup_part_files(output_dir).await;
                tracing::debug!("[perf] download_video took {:?}", _timer_start.elapsed());
                anyhow::bail!("Download cancelled");
            }
        };

        if let Some(download_id) = registered_download_id {
            unregister_download_process(download_id);
        }
        release_boot_slot(&boot_slot);

View on GitHub (pinned to 8600b91f42)