{"record":{"id":"42764b7702269ca0","repo":"remotion-dev/remotion","slug":"renderer-completed-manifest-references-missing-art","errorCode":null,"errorMessage":"Renderer completed manifest references missing artifact object ${artifact.key}","messagePattern":"Renderer completed manifest references missing artifact object (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/serverless/src/stream-renderer.ts","lineNumber":419,"sourceCode":"\t\t\t}\n\n\t\t\tif (status.state === 'completed') {\n\t\t\t\tconst downloadedKeys: string[] = [];\n\t\t\t\tconst emittedArtifacts: EmittedArtifact[] = [];\n\t\t\t\tfor (const artifact of status.artifacts) {\n\t\t\t\t\tlet artifactStream;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tartifactStream = await providerSpecifics.readFile({\n\t\t\t\t\t\t\tbucketName: payload.bucketName,\n\t\t\t\t\t\t\tkey: artifact.key,\n\t\t\t\t\t\t\tregion,\n\t\t\t\t\t\t\texpectedBucketOwner,\n\t\t\t\t\t\t\tforcePathStyle: payload.forcePathStyle,\n\t\t\t\t\t\t\trequestHandler,\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tif (isMissingObjectError(err)) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t`Renderer completed manifest references missing artifact object ${artifact.key}`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthrow err;\n\t\t\t\t\t}\n\n\t\t\t\t\temittedArtifacts.push(\n\t\t\t\t\t\tartifactFromS3({\n\t\t\t\t\t\t\tmetadata: artifact.metadata,\n\t\t\t\t\t\t\tcontent: await readStreamAsBytes(artifactStream),\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t\tdownloadedKeys.push(artifact.key);\n\t\t\t\t}\n\n\t\t\t\tconst downloadedFiles: string[] = [];\n\t\t\t\tfor (const [type, key] of [","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/serverless/src/stream-renderer.ts#L401-L437","documentation":"In @remotion/serverless's s3Renderer (the S3 transport used for serverless/Cloud Run rendering), once the renderer's status.json reports state 'completed', the orchestrator downloads every artifact key listed there (files the render emitted via onArtifact). If reading a key fails with a missing-object error (isMissingObjectError, i.e. S3 NoSuchKey/404), this error is thrown instead of the raw AWS error: the renderer declared an artifact that does not exist in the bucket.","triggerScenarios":"The renderer wrote status.json='completed' before all artifact uploads finished (or an artifact upload failed silently); a bucket lifecycle rule deleted objects under the render prefix mid-render; two renders reused the same renderId/bucket paths so one render's cleanup deleted the other's objects.","commonSituations":"Aggressive S3 lifecycle expiration (e.g. expire after 1 day) racing long renders; retry logic reusing the same renderId; cross-account bucket setups making some keys invisible; interrupted renderer instances leaving a manifest that references uploads that never landed.","solutions":["Retry the render with a fresh renderId - a partially completed manifest cannot be repaired mid-flight.","Check the bucket's lifecycle configuration and ensure nothing expires or transitions objects under the renders/ prefix while renders are in progress.","Ensure every render gets a unique renderId and never reuse one while artifacts from a previous attempt are still being cleaned up.","Inspect the renderer function's logs for upload errors around the artifact key named in the message.","If artifacts consistently disappear with matching versions and clean lifecycle rules, report it as a Remotion bug with the renderId."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"# Pre-render check: nothing may expire or transition render objects mid-render\naws s3api get-bucket-lifecycle-configuration --bucket \"$BUCKET\" \\\n  | jq '.Rules[] | select(.Filter | tostring | contains(\"renders\"))' \\\n  | grep . && echo \"WARNING: lifecycle rule touches renders/ prefix\" || echo \"renders/ prefix safe\"","typeGuard":null,"tryCatchPattern":"try {\n  await renderMediaOnCloudRun({...input, renderId: makeRenderId()});\n} catch (err) {\n  if (err.message.includes('manifest references missing artifact object')) {\n    // orphaned/partial manifest - clean prefix and retry once with a fresh renderId\n    await deleteRenderFolder(bucketName, renderId);\n    await renderMediaOnCloudRun({...input, renderId: makeRenderId()});\n  } else {\n    throw err;\n  }\n}","preventionTips":["Always generate a unique renderId per attempt; never reuse one while a previous attempt's artifacts are being cleaned up.","Keep S3 lifecycle rules away from the renders/ prefix, or make expiration far longer than your longest render.","Treat any 'missing object referenced by manifest' error as a poisoned attempt - retry fresh rather than resuming."],"tags":["serverless","s3","cloudrun","rendering","artifacts"],"backgroundTag":"s3-nosuchkey","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-08-22T21:45:17.748Z","contentChangedAt":"2026-08-22T21:45:17.748Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}