n8n-io/n8n · warning · NodeOperationError
Task ${taskId} did not complete within the maximum polling t
Error message
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. What it means
Thrown by pollTaskResult when the polling loop exhausts all MAX_POLL_ATTEMPTS (60) without the task reaching any terminal status (SUCCEEDED, FAILED, or CANCELED). With a default poll interval of 15 seconds, this means the task remained in a non-terminal state (e.g. PENDING, RUNNING) for approximately 15 minutes. The error message includes the taskId so the user can query the task status manually afterward.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vendors/AlibabaCloud/transport/index.ts:97
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
- Use the taskId from the error message to manually query the task status later via GET /api/v1/tasks/{taskId} on the DashScope API.
- Increase the poll timeout by modifying the pollTaskResult parameters (pollIntervalMs or MAX_POLL_ATTEMPTS in transport/index.ts) if you control the node code.
- Retry with a simpler task (lower resolution, shorter duration) to stay within the polling window.
- Check the DashScope service status page for ongoing slowness incidents.
- Split long video requests into multiple shorter-duration tasks that complete faster.
Example fix
// before — default 60 attempts × 15s = ~15 min budget const result = await pollTaskResult.call(this, taskId); // after — increase poll budget (requires node code modification) const result = await pollTaskResult.call(this, taskId, 15_000); // but increase MAX_POLL_ATTEMPTS // or use the taskId to poll manually after the workflow continues
Defensive patterns
Strategy: retry
Try / catch
try {
const result = await pollTaskResult.call(this, taskId);
// ... process result ...
} catch (error) {
if (error instanceof NodeOperationError && error.message.includes('did not complete within the maximum polling time')) {
// Extract taskId from error and poll manually in a separate step
const taskIdMatch = error.message.match(/Task (\S+) did not/);
const pendingTaskId = taskIdMatch?.[1];
// Store taskId for later manual polling via GET /api/v1/tasks/{taskId}
}
throw error;
} Prevention
- Use simpler video parameters (lower resolution, shorter duration) to reduce generation time within the 15-minute polling window.
- If you control the node code, increase MAX_POLL_ATTEMPTS or pollIntervalMs for long-running tasks.
- For very long tasks, consider splitting into multiple shorter-duration tasks.
- Save the taskId from the error message to manually check task status later via the DashScope API.
- Avoid peak-load periods when DashScope processing may be slower.
When it happens
Trigger: A video generation task is still PENDING or RUNNING after 60 poll attempts (≈15 minutes at the default 15-second interval). Video generation can legitimately take longer than this window for complex or high-resolution outputs, especially under high load. The task is not necessarily failed — it simply did not finish within the node's polling budget.
Common situations: High-resolution or long-duration video generation exceeding the 15-minute window; DashScope service under heavy load causing slow processing; the poll interval or max attempts are insufficient for the model/output complexity; network issues causing missed status updates.
Related errors
- Task failed: [${errorCode}] ${errorMessage}
- Video generation task was canceled
- Failed to create video generation task: ${createResponse?.me
- Failed to create video generation task: ${createResponse?.me
- Video task ${taskId} did not complete within the maximum pol
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/8a5b9670c5b9c54a.
Report an issue: GitHub.