remotion-dev/remotion · error · Error
Cannot cancel render ${input.renderId}: The render was not s
Error message
Cannot cancel render ${input.renderId}: The render was not started with enableCancellation: true. What it means
internalCancelRenderOnLambda first fetches the render's progress.json from S3 and refuses to cancel when its cancellationEnabled flag is not exactly true. Cancellation is opt-in per render because it adds a progress-polling overhead; only renders started with `enableCancellation: true` (CLI `--enable-cancellation`) can later be cancelled via cancelRenderOnLambda.
Source
Thrown at packages/lambda-client/src/cancel-render-on-lambda.ts:44
export const internalCancelRenderOnLambda = async (
input: InternalCancelRenderOnLambdaInput,
): Promise<void> => {
const expectedBucketOwner = await input.providerSpecifics.getAccountId({
region: input.region,
});
const progress = await getOverallProgressFromStorage({
bucketName: input.bucketName,
expectedBucketOwner,
region: input.region,
renderId: input.renderId,
providerSpecifics: input.providerSpecifics,
forcePathStyle: input.forcePathStyle,
requestHandler: input.requestHandler,
});
if (progress.cancellationEnabled !== true) {
throw new Error(
`Cannot cancel render ${input.renderId}: The render was not started with enableCancellation: true.`,
);
}
await writeCancellationSignal({
bucketName: input.bucketName,
renderId: input.renderId,
region: input.region,
expectedBucketOwner,
providerSpecifics: input.providerSpecifics,
forcePathStyle: input.forcePathStyle,
requestHandler: input.requestHandler,
});
};
/*
* @description Cancels an in-progress render that was started with enableCancellation: true.
* @see [Documentation](https://remotion.dev/docs/lambda/cancelrenderonlambda)View on GitHub (pinned to 10db9de073)
Solutions
- Start renders you may need to cancel with `enableCancellation: true` (CLI: `--enable-cancellation`).
- For an already-running non-cancellable render, wait for it to finish or delete its artifacts / let the retention period reap it; it cannot be cancelled retroactively.
- Propagate the flag through your render API so client-initiated cancels are possible.
Example fix
// before
await renderMediaOnLambda({composition: 'my-video', /* no enableCancellation */});
await cancelRenderOnLambda({renderId}); // throws
// after
await renderMediaOnLambda({composition: 'my-video', enableCancellation: true});
await cancelRenderOnLambda({renderId}); Defensive patterns
Strategy: try-catch
Validate before calling
// At render start, persist whether cancellation was enabled so the UI can disable the cancel button
const {renderId} = await renderMediaOnLambda({..., enableCancellation: true});
// store renderId with cancellation: true; only offer cancel for those renders Try / catch
try {
await cancelRenderOnLambda({renderId, region, bucketName});
} catch (e) {
if (e instanceof Error && e.message.includes('enableCancellation')) {
// render is not cancellable: mark as uncancellable in UI, do not retry
} else throw e;
} Prevention
- Default enableCancellation: true for any render a user may want to abort.
- Track the flag per render in your database and hide cancel actions for non-cancellable renders.
- Note the flag adds overhead; enable it only where cancellation is a product requirement.
When it happens
Trigger: Calling `cancelRenderOnLambda({renderId, ...})` (or pressing Ctrl+C on a CLI render, which routes through the same code via unregisterCtrlCHandler) for a render that was started without `enableCancellation: true`.
Common situations: Adding a cancel button to an app for renders that were never started with cancellation enabled; upgrading a pipeline that predates the option and forgetting to set it at start time.
Related errors
- cannot cancel render %s: the render was not started with ena
- Render did not finish yet
- Multiple frame ranges are not supported on Lambda. Use rende
- $response['message']
- Lambda function ${functionName} failed with an unhandled err
AI-assisted analysis of remotion-dev/remotion@10db9de073 (2026-08-22).
Data as JSON: /api/errors/6cc1f35c43869005.
Report an issue: GitHub.