{"record":{"id":"87e426a0e5e6122e","repo":"remotion-dev/remotion","slug":"renderer-s3-completed-status-is-invalid","errorCode":null,"errorMessage":"Renderer S3 completed status is invalid","messagePattern":"Renderer S3 completed status is invalid","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/serverless-client/src/renderer-transport.ts","lineNumber":136,"sourceCode":"\t\t!isNumber(status.encodedFrames) ||\n\t\t!isNumber(status.startedAt)\n\t) {\n\t\tthrow new Error('Renderer S3 status has invalid progress fields');\n\t}\n\n\tif (status.state === 'running') {\n\t\treturn status as S3RendererStatus;\n\t}\n\n\tif (status.state === 'completed') {\n\t\tif (\n\t\t\tstatus.lambdaInvoked !== true ||\n\t\t\t!isNumber(status.completedAt) ||\n\t\t\t!(typeof status.videoKey === 'string' || status.videoKey === null) ||\n\t\t\t!(typeof status.audioKey === 'string' || status.audioKey === null) ||\n\t\t\t!Array.isArray(status.artifacts)\n\t\t) {\n\t\t\tthrow new Error('Renderer S3 completed status is invalid');\n\t\t}\n\n\t\tfor (const artifact of status.artifacts) {\n\t\t\tconst candidate = artifact as {\n\t\t\t\tkey?: unknown;\n\t\t\t\tmetadata?: Record<string, unknown>;\n\t\t\t};\n\t\t\tif (\n\t\t\t\ttypeof artifact !== 'object' ||\n\t\t\t\tartifact === null ||\n\t\t\t\ttypeof candidate.key !== 'string' ||\n\t\t\t\ttypeof candidate.metadata !== 'object' ||\n\t\t\t\tcandidate.metadata === null ||\n\t\t\t\ttypeof candidate.metadata.filename !== 'string' ||\n\t\t\t\t!isNumber(candidate.metadata.frame) ||\n\t\t\t\ttypeof candidate.metadata.binary !== 'boolean' ||\n\t\t\t\t!(\n\t\t\t\t\tcandidate.metadata.downloadBehavior === null ||","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/remotion-dev/remotion/blob/10db9de07356446fb0edb3c3ae211369b693d18b/packages/serverless-client/src/renderer-transport.ts#L118-L154","documentation":"When status.state is 'completed', extra invariants apply: lambdaInvoked must be true, completedAt a finite number, videoKey and audioKey each string|null, and artifacts an array. Any deviation - artifacts missing, completedAt NaN, a numeric videoKey - throws this before the orchestrator acts on the manifest.","triggerScenarios":"A corrupted or hand-modified completed status; version skew where an older renderer wrote a completed payload without the artifacts/videoKey/audioKey fields; a partially written status from an interrupted uploader.","commonSituations":"Same family as the other transport validation errors: partial uploads, mixed Remotion versions between renderer and orchestrator, third-party processes touching the renders/ prefix.","solutions":["Inspect status.json and verify the completed payload's field types (artifacts array, videoKey/audioKey string or null, numeric completedAt).","Retry the render with a fresh renderId after cleaning the transport prefix.","Align and redeploy @remotion/* versions if the payload shape looks outdated.","If it reproduces with matched versions, report it with the status.json body."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"# Inspect the completed payload before retrying\naws s3 cp \"s3://$BUCKET/renders/$RENDER_ID/transport/chunks/$CHUNK/attempt-$ATTEMPT/status.json\" - \\\n  | jq '{state, lambdaInvoked, completedAt, videoKey, audioKey, artifacts: (.artifacts | type)}'","typeGuard":null,"tryCatchPattern":"try {\n  await renderMediaOnCloudRun({...input, renderId: makeRenderId()});\n} catch (err) {\n  if (err.message.includes('Renderer S3 completed status is invalid')) {\n    await renderMediaOnCloudRun({...input, renderId: makeRenderId()});\n  } else {\n    throw err;\n  }\n}","preventionTips":["Align @remotion/* versions and redeploy renderers after every upgrade - malformed completed payloads are almost always version skew.","Never hand-edit or replay status.json objects in the transport prefix.","Treat a completed-but-invalid manifest as unrecoverable and retry with a fresh renderId."],"tags":["serverless","s3","validation","status-json","transport"],"backgroundTag":"schema-validation-failed","analyzedSha":"10db9de07356446fb0edb3c3ae211369b693d18b","analyzedAt":"2026-08-22T21:45:17.748Z","contentChangedAt":"2026-08-22T21:45:17.748Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}