{"record":{"id":"fb744df43e53b854","repo":"remotion-dev/remotion","slug":"renderer-completed-manifest-references-missing-med","errorCode":null,"errorMessage":"Renderer completed manifest references missing media object ${key}","messagePattern":"Renderer completed manifest references missing media object (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/serverless/src/stream-renderer.ts","lineNumber":461,"sourceCode":"\t\t\t\t\t}\n\n\t\t\t\t\tconst filename = join(\n\t\t\t\t\t\toutdir,\n\t\t\t\t\t\t`chunk-${String(payload.chunk).padStart(8, '0')}-${type}`,\n\t\t\t\t\t);\n\t\t\t\t\tlet media;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmedia = await providerSpecifics.readFile({\n\t\t\t\t\t\t\tbucketName: payload.bucketName,\n\t\t\t\t\t\t\tkey,\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 media object ${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\tawait pipeline(media, createWriteStream(filename));\n\t\t\t\t\tdownloadedFiles.push(filename);\n\t\t\t\t\tdownloadedKeys.push(key);\n\t\t\t\t}\n\n\t\t\t\tfor (const emittedArtifact of emittedArtifacts) {\n\t\t\t\t\tconst artifactRegistration = onArtifact({\n\t\t\t\t\t\tartifact: emittedArtifact,\n\t\t\t\t\t\tchunk: payload.chunk,\n\t\t\t\t\t\tattempt: payload.attempt,\n\t\t\t\t\t});","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/serverless/src/stream-renderer.ts#L443-L479","documentation":"Same s3Renderer flow as the artifact case: after status.json reports 'completed', the orchestrator downloads the chunk's media objects (status.videoKey / status.audioKey) to the output directory as chunk-XXXXXXXX-{video,audio} files. A missing-object error (isMissingObjectError, S3 NoSuchKey/404) on either key throws this - the renderer's manifest promised media that is not in the bucket.","triggerScenarios":"The renderer uploaded the completed status before the large video/audio chunk uploads finished; a bucket lifecycle rule deleted the chunk objects; renderId reuse made one attempt's cleanup remove another's media; an oversized chunk upload failed server-side after the status was already written.","commonSituations":"Large chunk files timing out on upload in constrained networks; lifecycle rules racing long renders; concurrent renders sharing a bucket prefix; partially upgraded deployments writing inconsistent manifests.","solutions":["Retry the render with a fresh renderId - the missing chunk media cannot be recovered.","Audit the bucket lifecycle rules so nothing deletes renders/* objects during a render.","Guarantee unique renderIds and single-writer access per render prefix.","Check the renderer's logs for upload errors on the exact key named in the message.","If reproducible with matched versions, report it as a Remotion bug including the renderId and key."],"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 media object')) {\n    // chunk media upload was lost - retry the whole render with a new renderId\n    await renderMediaOnCloudRun({...input, renderId: makeRenderId()});\n  } else {\n    throw err;\n  }\n}","preventionTips":["Generate a unique renderId per render attempt; reuse is the top cause of missing chunk media.","Do not let lifecycle rules delete objects under renders/ while renders are in progress.","Monitor renderer logs for upload failures - a completed manifest with missing media usually means an upload failed silently."],"tags":["serverless","s3","cloudrun","rendering","chunk-media"],"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"}