BloopAI/vibe-kanban · error · ContainerError
Copy files task failed: {e}
Error message
Copy files task failed: {e} What it means
This error wraps the JoinError or inner error from the spawned blocking copy task: if the spawned task panicked or was cancelled before completing, JoinError yields 'Copy files task failed: {e}'. (The inner copy error itself is propagated separately.) It means the background copy task died abnormally.
Source
Thrown at crates/local-deployment/src/container.rs:1600
async fn copy_project_files(
&self,
source_dir: &Path,
target_dir: &Path,
copy_files: &str,
) -> Result<(), ContainerError> {
let source_dir = source_dir.to_path_buf();
let target_dir = target_dir.to_path_buf();
let copy_files = copy_files.to_string();
tokio::time::timeout(
std::time::Duration::from_secs(30),
tokio::task::spawn_blocking(move || {
copy::copy_project_files_impl(&source_dir, &target_dir, ©_files)
}),
)
.await
.map_err(|_| ContainerError::Other(anyhow!("Copy project files timed out after 30s")))?
.map_err(|e| ContainerError::Other(anyhow!("Copy files task failed: {e}")))?
}
async fn kill_all_running_processes(&self) -> Result<(), ContainerError> {
tracing::info!("Killing all running processes");
let running_processes = ExecutionProcess::find_running(&self.db.pool).await?;
tracing::info!(
"Found {} running processes to kill",
running_processes.len()
);
for process in running_processes {
tracing::info!(
"Killing process: id={}, run_reason={:?}",
process.id,
process.run_reason
);
if let Err(error) = selfView on GitHub (pinned to 4deb7eca8f)
Solutions
- Read the wrapped '{e}' message to find the underlying panic or join error and fix the root cause in copy_project_files_impl.
- Fix filesystem-level issues (permissions, broken symlinks) in the source directory before copying.
- Retry the copy operation; transient cancellations may succeed on a second attempt.
- Harden copy_project_files_impl to return errors instead of panicking on edge-case paths.
Defensive patterns
Strategy: try-catch
Validate before calling
// sanity-check inputs before spawning the blocking task
if !source_dir.is_dir() {
return Err(anyhow!("source dir missing: {}", source_dir.display()));
} Try / catch
match copy_project_files(...).await {
Err(ContainerError::Other(e)) if e.to_string().starts_with("Copy files task failed") => {
tracing::error!(%e, "copy task panicked/cancelled; inspect root cause");
}
other => other?,
} Prevention
- Avoid unwrap/expect in copy_project_files_impl; return Results instead.
- Pre-check permissions and symlink validity in the source tree.
- Avoid cancelling the runtime while copies are in flight.
When it happens
Trigger: copy_project_files_impl panics inside spawn_blocking (e.g. unexpected filesystem state, invalid UTF-8 assumptions), or the blocking task is cancelled (e.g. by the 30s timeout in [131] racing, or runtime shutdown).
Common situations: Bug-triggered panics in the copy implementation on exotic paths (symlinks, permission-denied dirs handled with unwrap); shutting down the runtime mid-copy; a panic in a nested copy helper.
Related errors
- Failed to copy database file
- Failed to create asset directory
- OS didn't give us a home directory
- OS didn't give us a home directory
- failed to build global Tokio runtime
AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29).
Data as JSON: /api/errors/5551b18e645175f9.
Report an issue: GitHub.