{"record":{"id":"243e0789bfa34b24","repo":"remotion-dev/remotion","slug":"renderer-s3-completed-status-has-an-invalid-artifa","errorCode":null,"errorMessage":"Renderer S3 completed status has an invalid artifact","messagePattern":"Renderer S3 completed status has an invalid artifact","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/serverless-client/src/renderer-transport.ts","lineNumber":158,"sourceCode":"\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 ||\n\t\t\t\t\ttypeof candidate.metadata.downloadBehavior === 'object'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tthrow new Error('Renderer S3 completed status has an invalid artifact');\n\t\t\t}\n\t\t}\n\n\t\treturn status as S3RendererStatus;\n\t}\n\n\tif (status.state === 'failed') {\n\t\tif (\n\t\t\t!isNumber(status.failedAt) ||\n\t\t\ttypeof status.shouldRetry !== 'boolean' ||\n\t\t\ttypeof status.errorInfo !== 'object' ||\n\t\t\tstatus.errorInfo === null\n\t\t) {\n\t\t\tthrow new Error('Renderer S3 failed status is invalid');\n\t\t}\n\n\t\treturn status as S3RendererStatus;\n\t}","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/remotion-dev/remotion/blob/10db9de07356446fb0edb3c3ae211369b693d18b/packages/serverless-client/src/renderer-transport.ts#L140-L176","documentation":"Each entry of the completed status's artifacts array must be an object with a string key and a metadata object whose filename is a string, frame a finite number, binary a boolean, and downloadBehavior null or an object. One malformed artifact entry fails the whole parse, because the orchestrator is about to download each key and emit it via onArtifact.","triggerScenarios":"The renderer emitted an artifact (via onArtifact during the render) whose filename was not a string or whose metadata was partially serialized - typically a version-skewed renderer or a custom artifact emission path that bypasses normal validation.","commonSituations":"Mixed Remotion versions between the code that emits artifacts and the orchestrator; user code calling the artifact APIs with unusual values; corrupted uploads.","solutions":["Inspect the artifacts array inside status.json and find the entry with a non-string key/filename, non-numeric frame, or malformed downloadBehavior.","Check any custom artifact-emitting code in your project for values that do not match the expected types.","Retry with a fresh renderId after the emitter is fixed.","Align @remotion/* versions and redeploy, since mismatched versions are the most common cause."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"# Find the malformed artifact entry\naws s3 cp \"s3://$BUCKET/renders/$RENDER_ID/transport/chunks/$CHUNK/attempt-$ATTEMPT/status.json\" - \\\n  | jq '.artifacts | to_entries[] | select((.value.key | type) != \"string\" or ((.value.metadata.filename // null) == null))'","typeGuard":null,"tryCatchPattern":"try {\n  await renderMediaOnCloudRun({...input, renderId: makeRenderId()});\n} catch (err) {\n  if (err.message.includes('completed status has an invalid artifact')) {\n    // usually version skew in artifact emission - align, redeploy, retry fresh\n    await renderMediaOnCloudRun({...input, renderId: makeRenderId()});\n  } else {\n    throw err;\n  }\n}","preventionTips":["If you emit artifacts from custom render code, always pass a string filename, numeric frame, boolean binary, and null-or-object downloadBehavior.","Keep renderer and orchestrator on identical Remotion versions.","Never inject hand-built entries into the artifacts array of status.json."],"tags":["serverless","s3","validation","artifacts","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-14T05:17:10.506Z"}