remotion-dev/remotion · error · Error

Renderer S3 completed status has an invalid artifact

Error message

Renderer S3 completed status has an invalid artifact

What it means

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.

Source

Thrown at packages/serverless-client/src/renderer-transport.ts:158

			const candidate = artifact as {
				key?: unknown;
				metadata?: Record<string, unknown>;
			};
			if (
				typeof artifact !== 'object' ||
				artifact === null ||
				typeof candidate.key !== 'string' ||
				typeof candidate.metadata !== 'object' ||
				candidate.metadata === null ||
				typeof candidate.metadata.filename !== 'string' ||
				!isNumber(candidate.metadata.frame) ||
				typeof candidate.metadata.binary !== 'boolean' ||
				!(
					candidate.metadata.downloadBehavior === null ||
					typeof candidate.metadata.downloadBehavior === 'object'
				)
			) {
				throw new Error('Renderer S3 completed status has an invalid artifact');
			}
		}

		return status as S3RendererStatus;
	}

	if (status.state === 'failed') {
		if (
			!isNumber(status.failedAt) ||
			typeof status.shouldRetry !== 'boolean' ||
			typeof status.errorInfo !== 'object' ||
			status.errorInfo === null
		) {
			throw new Error('Renderer S3 failed status is invalid');
		}

		return status as S3RendererStatus;
	}

View on GitHub (pinned to 10db9de073)

Solutions

  1. Inspect the artifacts array inside status.json and find the entry with a non-string key/filename, non-numeric frame, or malformed downloadBehavior.
  2. Check any custom artifact-emitting code in your project for values that do not match the expected types.
  3. Retry with a fresh renderId after the emitter is fixed.
  4. Align @remotion/* versions and redeploy, since mismatched versions are the most common cause.
Defensive patterns

Strategy: retry

Validate before calling

# Find the malformed artifact entry
aws s3 cp "s3://$BUCKET/renders/$RENDER_ID/transport/chunks/$CHUNK/attempt-$ATTEMPT/status.json" - \
  | jq '.artifacts | to_entries[] | select((.value.key | type) != "string" or ((.value.metadata.filename // null) == null))'

Try / catch

try {
  await renderMediaOnCloudRun({...input, renderId: makeRenderId()});
} catch (err) {
  if (err.message.includes('completed status has an invalid artifact')) {
    // usually version skew in artifact emission - align, redeploy, retry fresh
    await renderMediaOnCloudRun({...input, renderId: makeRenderId()});
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: 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.

Common situations: Mixed Remotion versions between the code that emits artifacts and the orchestrator; user code calling the artifact APIs with unusual values; corrupted uploads.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of remotion-dev/remotion@10db9de073 (2026-08-22). Data as JSON: /api/errors/243e0789bfa34b24. Report an issue: GitHub.