n8n-io/n8n · warning · NodeOperationError
Video generation task was canceled
Error message
Video generation task was canceled
What it means
Thrown by pollTaskResult when the AlibabaCloud DashScope task API returns a terminal status of 'CANCELED'. The polling loop detects this status and throws immediately with a fixed message. A CANCELED status means the task was explicitly terminated before completion — either by the user, by an administrator, or by the platform's internal timeout/cleanup process.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vendors/AlibabaCloud/transport/index.ts:86
this: IExecuteFunctions,
taskId: string,
pollIntervalMs: number = DEFAULT_POLL_INTERVAL_MS,
): Promise<IDataObject> {
for (let attempt = 0; attempt < MAX_POLL_ATTEMPTS; attempt++) {
const response = await apiRequest.call(this, 'GET', `/api/v1/tasks/${taskId}`);
const taskStatus = response?.output?.task_status as string;
if (TERMINAL_STATUSES.includes(taskStatus)) {
if (taskStatus === 'FAILED') {
const errorCode = response?.output?.code || response?.code || 'UNKNOWN';
const errorMessage =
response?.output?.message || response?.message || 'Video generation task failed';
throw new NodeOperationError(this.getNode(), `Task failed: [${errorCode}] ${errorMessage}`);
}
if (taskStatus === 'CANCELED') {
throw new NodeOperationError(this.getNode(), 'Video generation task was canceled');
}
// SUCCEEDED
return response as IDataObject;
}
// Wait before next poll
await sleep(pollIntervalMs);
}
throw new NodeOperationError(
this.getNode(),
`Task ${taskId} did not complete within the maximum polling time. Last status was not terminal. You can query the task manually using the task ID.`,
);
}
View on GitHub (pinned to 5ac6606e81)
Solutions
- Check the DashScope console for the task's cancellation reason if available.
- Retry the video generation — if it was a transient platform cancellation, a new task may succeed.
- Verify the account's DashScope subscription and quota are still active.
- If cancellations are recurring, reduce task complexity (lower resolution, shorter duration) or check for account-level restrictions.
Defensive patterns
Strategy: try-catch
Try / catch
try {
const result = await pollTaskResult.call(this, taskId);
// ... process result ...
} catch (error) {
if (error instanceof NodeOperationError && error.message.includes('was canceled')) {
// task was canceled — retry or notify the user
console.warn(`Video task ${taskId} was canceled. Retrying...`);
// optionally re-create the task
}
throw error;
} Prevention
- Check the DashScope console for the cancellation reason if tasks are canceled frequently.
- Ensure the Alibaba Cloud account/subscription is active and in good standing.
- Retry canceled tasks — platform-initiated cancellations are often transient.
- Reduce task complexity to minimize processing time and cancellation risk.
When it happens
Trigger: The video generation task was canceled after creation but before reaching SUCCEEDED. This can happen if the task was manually canceled via the DashScope console or API, if the Alibaba Cloud platform canceled it due to resource constraints or policy, or if the associated account/subscription was modified during task processing.
Common situations: Task exceeded an internal platform timeout; account quota or subscription changed mid-task; manual cancellation via DashScope console; platform resource contention causing preemption.
Related errors
- Task failed: [${errorCode}] ${errorMessage}
- Task ${taskId} did not complete within the maximum polling t
- Failed to create video generation task: ${createResponse?.me
- Failed to create video generation task: ${createResponse?.me
- Task failed: [${errorCode}] ${errorMessage}
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/b151565c217936a9.
Report an issue: GitHub.