tonhowtf/omniget · error
All playlist item(s) failed to download. First error
Error message
All {} playlist item(s) failed to download. First error: {} What it means
After iterating all playlist items, download_playlist() reports total failure if success_count == 0. It includes the first item's error as detail ('unknown error' if none was captured) so the caller learns why every item failed.
Solutions
- Inspect 'First error: ...' in the message — fix the underlying per-item error it reports.
- Re-fetch media info right before downloading so CDN URLs are fresh, then retry.
- Check network/proxy connectivity and account cookies if the first error mentions auth or 403.
- Improve the code to aggregate all item errors (not just the first) for better diagnostics.
Example fix
// before
return Err(anyhow!("All {} playlist item(s) failed to download. First error: {}", total, detail));
// after
let details: Vec<String> = item_errors.iter().map(|e| e.to_string()).take(3).collect();
return Err(anyhow!("All {} playlist item(s) failed. First errors: {}", total, details.join("; "))); Defensive patterns
Strategy: retry
Try / catch
match download(...).await {
Err(e) if e.to_string().starts_with("All ") && e.to_string().contains("playlist item(s) failed") => {
let first = extract_first_error(&e.to_string());
retry_with_fresh_info(url).await
}
other => other,
} Prevention
- Re-fetch media info immediately before downloading so CDN URLs are fresh.
- Check the 'First error:' detail before retrying — fix the root cause.
- Ensure stable network/proxy for long playlist downloads.
- Aggregate per-item errors in your own logs for diagnosis.
When it happens
Trigger: download() -> download_playlist() where every playlist item's download future returned Err (network failures, expired CDN URLs, per-item extraction errors), leaving success_count at 0.
Common situations: Bilibili CDN URLs expired because fetching info and downloading were separated by too long; network/proxy outage; all items hit the same auth or region restriction; the per-item downloader has a systematic bug after an API change.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- Playlist empty or unavailable
- No URL available
- Download cancelled
- No URL available
- Playlist empty or unavailable
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/97b0a578a66a7b2c.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/platforms/bilibili/legacy.rs:327
success_count += 1;
last_result.file_size_bytes += result.file_size_bytes;
last_result.duration_seconds += result.duration_seconds;
last_result.file_path = result.file_path;
}
Err(e) => {
tracing::error!("[bilibili] playlist item {} failed: {}", i + 1, e);
if first_error.is_none() {
first_error = Some(e);
}
}
}
}
if success_count == 0 {
let detail = first_error
.map(|e| e.to_string())
.unwrap_or_else(|| "unknown error".to_string());
return Err(anyhow!(
"All {} playlist item(s) failed to download. First error: {}",
total,
detail
));
}
let _ = progress.send(ProgressUpdate::percent(100.0)).await;
Ok(last_result)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn cheese_episode_is_not_playlist() {
assert!(!is_playlist_or_series(
"https://www.bilibili.com/cheese/play/ep2143"View on GitHub (pinned to 8600b91f42)