{"record":{"id":"2adc82ae1545fdf3","repo":"remotion-dev/remotion","slug":"fast-start-finalization-did-not-produce-an-output","errorCode":null,"errorMessage":"Fast Start finalization did not produce an output file","messagePattern":"Fast Start finalization did not produce an output file","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/renderer/src/finalize-fast-start.ts","lineNumber":82,"sourceCode":"\t\t\tbreak;\n\t\t} catch (error) {\n\t\t\tawait promises.rm(candidate, {force: true}).catch(() => undefined);\n\t\t\tconst isReopenFailure =\n\t\t\t\tstderr.includes('Unable to re-open') &&\n\t\t\t\tstderr.includes('output file for shifting data');\n\t\t\tif (!isReopenFailure || attempt === 2) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\tLog.verbose(\n\t\t\t\t{indent, logLevel, tag: 'stitchFramesToVideo()'},\n\t\t\t\t`Retrying Fast Start finalization (attempt ${attempt + 2} of 3)`,\n\t\t\t);\n\t\t}\n\t}\n\n\tif (fastStartFile === null) {\n\t\tthrow new Error('Fast Start finalization did not produce an output file');\n\t}\n\n\tif (force) {\n\t\tawait promises.rename(fastStartFile, output);\n\t\treturn;\n\t}\n\n\ttry {\n\t\tawait promises.link(fastStartFile, output);\n\t} finally {\n\t\tawait promises.rm(fastStartFile, {force: true});\n\t}\n};\n","sourceCodeStart":64,"sourceCodeEnd":96,"githubUrl":"https://github.com/remotion-dev/remotion/blob/8f9775815716e25b2a9fd9c5511015a17624243d/packages/renderer/src/finalize-fast-start.ts#L64-L96","documentation":"When rendering with onArtifact on serverless, each artifact filename must be unique. If the render emits two artifacts with the same filename, the conflict registration causes this error, because artifacts would overwrite each other.","triggerScenarios":"Calling onArtifact twice with the same filename from a single render — e.g. emitArtifact({filename: 'out.txt'}) executed in multiple chunks or multiple times in the same composition.","commonSituations":"An emitArtifact() call in a component that renders per-frame or is duplicated across compositions, so the same filename is emitted repeatedly.","solutions":["Make artifact filenames unique per emission (include frame, chunk, or a counter)","Move emitArtifact to a place that runs once per render instead of per frame","Include deterministic context in the filename such as frame or inputProps hash"],"exampleFix":"// before\nemitArtifact({filename: 'report.txt', data});\n\n// after\nemitArtifact({filename: `report-${frame}.txt`, data});","handlingStrategy":"validation","validationCode":"const seen = new Set<string>();\nconst safeFilename = (f: string) => seen.has(f) ? `${seen.size}-${f}` : (seen.add(f), f);","typeGuard":null,"tryCatchPattern":"try { await renderWithSingleFunction({...}); } catch (e) { if (e.message.includes('emitted more than once')) { /* make artifact filenames unique, re-render */ } }","preventionTips":["Include frame/chunk context in every artifact filename","Call emitArtifact from once-per-render contexts, not per frame"],"tags":["serverless","artifacts","conflict","lambda"],"backgroundTag":"duplicate-artifact-filename","analyzedSha":"8f9775815716e25b2a9fd9c5511015a17624243d","analyzedAt":"2026-08-28T15:39:09.316Z","contentChangedAt":"2026-08-28T15:39:09.316Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}