AlistGo/alist · warning

the task has been deleted

Error message

the task has been deleted

What it means

When Status polls the provider with GetTasks(driver, task.GID) and the loop finds no task whose TaskID matches the GID, the task is assumed deleted server-side. The default status text 'the task has been deleted' is also used as the error. This is a synthesized terminal state, not a transport error.

Source

Thrown at internal/offline_download/guangyapan/guangyapan.go:125

		return nil, err
	}
	status := &tool.Status{
		Status: "the task has been deleted",
	}
	for _, t := range tasks {
		if t.TaskID != task.GID {
			continue
		}
		status.Progress = float64(t.Progress)
		status.TotalBytes = t.TotalSize
		status.Completed = t.Status == offlineStatusCompleted || t.Status == offlineStatusPartiallyCompleted
		status.Status = taskStatusText(t)
		if t.Status == offlineStatusFailed || t.Status == offlineStatusCanceled {
			status.Err = errors.New(status.Status)
		}
		return status, nil
	}
	status.Err = errors.New("the task has been deleted")
	return status, nil
}

func init() {
	tool.Tools.Add(&GuangYaPan{})
}

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Treat as terminal: remove the local task record (it cannot be resumed)
  2. If the file was expected to exist, verify the destination directory for the downloaded output before cleanup
  3. If tasks vanish immediately, check that the GID recorded at AddURL time matches the provider's TaskID format
Defensive patterns

Strategy: try-catch

Try / catch

if st.Err != nil && st.Status == "the task has been deleted" {
    // provider no longer knows this GID: terminal, clean up local state
    dropTaskRecord(task.GID)
    return
}

Prevention

When it happens

Trigger: The provider's task list no longer contains the GID: task expired, was purged by the provider, or was deleted via DeleteOfflineTasks while the local record still exists. Also if the task cache was refreshed and the GID never appears.

Common situations: Provider prunes completed/failed tasks after a retention window; a race between Remove and Status; or GID mismatch after re-adding a task.

Related errors


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/74dcd8493200e748. Report an issue: GitHub.