remotion-dev/remotion · error · RemotionException
Could not read progress for render {render_id}: {error}
Error message
Could not read progress for render {render_id}: {error} What it means
The Python client's cancel_render_on_lambda() first reads renders/{render_id}/progress.json from S3 via get_object and parses it as JSON. Any boto3 ClientError (most commonly NoSuchKey because the object does not exist), or KeyError/TypeError/json.JSONDecodeError from a malformed body, is re-raised as RemotionException with the original error chained via 'from error'.
Source
Thrown at packages/lambda-python/remotion_lambda/remotionclient.py:640
)
if body_object:
return RenderMediaResponse(
bucket_name=body_object['bucketName'], render_id=body_object['renderId']
)
return None
def cancel_render_on_lambda(self, render_id: str, bucket_name: str) -> None:
"""Cancel a render started with ``enable_cancellation=True``."""
s3_client = self._create_s3_client()
try:
progress_object = s3_client.get_object(
Bucket=bucket_name,
Key=f"renders/{render_id}/progress.json",
)
progress = json.loads(progress_object['Body'].read())
except (ClientError, KeyError, TypeError, json.JSONDecodeError) as error:
raise RemotionException(
f"Could not read progress for render {render_id}: {error}"
) from error
if progress.get('cancellationEnabled') is not True:
raise RemotionInvalidArgumentException(
f"Cannot cancel render {render_id}: The render was not started "
"with enableCancellation: true."
)
try:
s3_client.put_object(
Bucket=bucket_name,
Key=f"renders/{render_id}/cancel.json",
Body=json.dumps({'cancelledAt': int(time.time() * 1000)}),
ContentType='application/json',
)
except ClientError as error:
raise RemotionException(View on GitHub (pinned to 10db9de073)
Solutions
- Verify render_id is the exact value returned by render_media_on_lambda() - no trimming or case changes.
- If the render already completed, cancellation is unnecessary: catch the error and treat 'NoSuchKey' in the message as already-finished.
- Check the bucket_name and region arguments against the ones the render actually used.
- Inspect the chained cause - the boto3 error code distinguishes NoSuchKey, AccessDenied, and NoSuchBucket, each with a different fix.
Defensive patterns
Strategy: try-catch
Validate before calling
import boto3
from botocore.exceptions import ClientError
s3 = boto3.client("s3", region_name=region)
try:
s3.head_object(Bucket=bucket_name, Key=f"renders/{render_id}/progress.json")
except ClientError as e:
if e.response["Error"]["Code"] in ("404", "NoSuchKey", "NotFound"):
pass # nothing to cancel - render already finished or wrong id
else:
raise Try / catch
from remotion_lambda.errors import RemotionException
try:
client.cancel_render_on_lambda(render_id, bucket_name)
except RemotionException as e:
msg = str(e)
if "NoSuchKey" in msg:
# render already finished or id is wrong - nothing to cancel
return
if "AccessDenied" in msg:
raise RuntimeError("Cancel credentials lack S3 read/write access") from e
raise Prevention
- Persist the full render_media_on_lambda() response and cancel from it; never hand-copy render ids.
- Poll get_render_progress() first and only cancel while the render is still running.
- Keep bucket/region configuration in one shared object used by both the render and cancel paths.
When it happens
Trigger: Calling cancel_render_on_lambda() with a wrong or typo'd render_id (NoSuchKey); canceling after the render already finished and cleanup deleted progress.json; passing a bucket_name/region that differs from the render's; a truncated or non-JSON body at the key (e.g. an XML error page from an S3-compatible endpoint).
Common situations: Retry logic that attempts to cancel a stale render long after it finished; render_id copied from logs with a missing character; default bucket name used while the render went to a custom bucket; MinIO/R2-style endpoints returning unexpected bodies.
Related errors
- Could not cancel render {render_id}: {error}
- Cannot cancel render {$renderId}: The render was not started
- Cannot cancel render {render_id}: The render was not started
- You have multiple buckets ({', '.join(buckets)}) in your S3
- could not read progress for render %q: %w
AI-assisted analysis of remotion-dev/remotion@10db9de073 (2026-08-22).
Data as JSON: /api/errors/b2ba49960ca4933a.
Report an issue: GitHub.