nexu-io/open-design · error · Error

Vela video task ended with status ${lastStatus}: ${videoTask

Error message

Vela video task ended with status ${lastStatus}: ${videoTaskError(task)}

What it means

The polled Vela video task reached a terminal failure state — status is 'failed', 'cancelled', or 'canceled'. The error message includes the backend-specific detail extracted by videoTaskError(task).

Source

Thrown at apps/daemon/src/media/vela.ts:506

      if (returnedTaskId !== taskId) {
        throw new Error(
          `Vela video get returned unexpected task_id ${returnedTaskId ?? 'missing'} (expected ${taskId})`,
        );
      }
      lastStatus = nonEmptyString(task.status) ?? 'missing';
      const elapsedSeconds = Math.round((Date.now() - startedAt) / 1000);
      input.onProgress?.(`Vela video status ${lastStatus}; elapsed ${elapsedSeconds}s`);

      if (lastStatus === 'succeeded') {
        const bytes = await readNonEmptyOutput(outputPath, 'video get');
        return {
          bytes,
          providerNote: `vela/${wireModel} · ${ratio} · ${input.length ?? 5}s · ${DEFAULT_VELA_VIDEO_RESOLUTION} default · ${bytes.length} bytes`,
          suggestedExt: '.mp4',
        };
      }
      if (lastStatus === 'failed' || lastStatus === 'cancelled' || lastStatus === 'canceled') {
        throw new Error(`Vela video task ended with status ${lastStatus}: ${videoTaskError(task)}`);
      }
      if (lastStatus !== 'queued' && lastStatus !== 'running') {
        throw new Error(`Vela video task returned unsupported status ${lastStatus}`);
      }
    }

    throw new Error(
      `Vela video task timed out after ${totalTimeoutMs}ms; last status ${lastStatus}`,
    );
  } finally {
    await rm(tempDir, { recursive: true, force: true });
  }
}

View on GitHub (pinned to 5be4028344)

Solutions

  1. Read the videoTaskError(task) detail in the thrown error for the specific backend reason
  2. Verify input images meet content and format requirements (count, dimensions, format)
  3. Retry with different input images or a different model
  4. Check Vela workspace quota and billing status
Defensive patterns

Strategy: try-catch

Try / catch

try {
  const result = await renderVelaVideo(input);
} catch (err) {
  if (err.message.includes('task ended with status')) {
    // Backend failure — surface the error detail to the user
    const detail = err.message;
    throw new UserFacingError(`Video generation failed: ${detail}`);
  }
  throw err;
}

Prevention

When it happens

Trigger: The Vela backend rejected the video generation due to content policy, invalid input images, or a model error; a user or system cancelled the task; the task was canceled due to resource constraints or timeout on the server side.

Common situations: Input images violate content policy; the model failed to produce output; the task was manually cancelled from another client; backend GPU/resource limits exceeded.

Related errors


AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12). Data as JSON: /api/errors/15106346f47f1517. Report an issue: GitHub.