zellij-org/zellij · error · DownloaderError
failed to spawn runtime for download task
Error message
failed to spawn runtime for download task
What it means
Error "failed to spawn runtime for download task" thrown in zellij-org/zellij.
Source
Thrown at zellij-utils/src/downloader.rs:199
///
/// At the moment, this function is only here to bridge the gap between the async
/// [`Downloader`] impl and the sync [`Layout`] code that ultimately calls this function. This
/// is needed since the Layout code can't trivially be turned `async` without a lot of
/// refactoring, while the Downloader is used in many other places with async code and can't
/// sensibly be sync. Maybe in the future, when more code around here is async, we can drop
/// this function.
pub fn download_without_cache_blocking(url: &str) -> Result<String, DownloaderError> {
let runtime_handle = match tokio::runtime::Handle::try_current() {
Ok(handle) => handle.clone(),
Err(e) if e.is_missing_context() => {
let runtime = tokio::runtime::Builder::new_current_thread()
.thread_name("ephemeral runtime for downloader implementation")
.build()
.map_err(DownloaderError::Io)?;
runtime.handle().clone()
},
_ => {
return Err(DownloaderError::Io(std::io::Error::new(
std::io::ErrorKind::Other,
"failed to spawn runtime for download task",
)))
},
};
runtime_handle.block_on(async move { Downloader::download_without_cache(url).await })
}
fn parse_name(&self, url: &str) -> Result<String, DownloaderError> {
Url::parse(url)
.map_err(|_| DownloaderError::NotFoundFileName(url.to_string()))?
.path_segments()
.ok_or_else(|| DownloaderError::NotFoundFileName(url.to_string()))?
.last()
.ok_or_else(|| DownloaderError::NotFoundFileName(url.to_string()))
.map(|s| s.to_string())
}
async fn acquire_download_lock(&self, file_name: &String) -> Arc<Mutex<()>> {View on GitHub (pinned to 5cb5df5cce)
Solutions
- Check system resource limits (open files, processes) and the OS error attached to the failure.
- Retry the operation; if persistent, report the OS error with a zellij issue.
When it happens
Trigger: Occurs at zellij-utils/src/downloader.rs:199 when the operation fails: "failed to spawn runtime for download task". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.
Common situations: Typically resource exhaustion, invalid fd state, or platform-specific pty limitations.
AI-assisted analysis of zellij-org/zellij@5cb5df5cce (2026-08-19).
Data as JSON: /api/errors/73c7fc0ef72dfb72.
Report an issue: GitHub.