remotion-dev/remotion · error · Error

Failed to render GIF with source ${src}: "${error.message}".

Error message

Failed to render GIF with source ${src}: "${error.message}". Render with --log=verbose to see the full stack.

What it means

Thrown by GifForRendering during a server-side render when the GIF fetch/decode failed for a non-CORS reason. The message directs the user to re-run with `--log=verbose` because, unlike the Studio path, the full stack is only emitted through `Internals.Log` at verbose level rather than always to stderr.

Source

Thrown at packages/gif/src/GifForRendering.tsx:156

		}, [
			renderHandle,
			logLevel,
			cacheKey,
			resolvedSrc,
			delayRender,
			continueRender,
			delayRenderTimeoutInMilliseconds,
		]);

		if (error) {
			Internals.Log.error({logLevel, tag: null}, error.stack);
			if (isCorsError(error)) {
				throw new Error(
					`Failed to render GIF with source ${src}: "${error.message}". You must enable CORS for this URL.`,
				);
			}

			throw new Error(
				`Failed to render GIF with source ${src}: "${error.message}". Render with --log=verbose to see the full stack.`,
			);
		}

		if (index === -1) {
			return null;
		}

		return (
			<Canvas
				fit={fit}
				index={index}
				frames={state.frames}
				width={width}
				height={height}
				effects={effects}
				{...props}
				ref={ref}

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Re-run the render with `--log=verbose` (or set `Config.setLogLevel('verbose')`) to see the original error stack.
  2. Confirm the render environment can reach the URL (curl it from the CI/Lambda context).
  3. Validate the GIF file is well-formed by opening it locally.
  4. Switch the asset to `staticFile()` to remove the network dependency from the render.

Example fix

# before
npx remotion render MyComp out/video.mp4

# after
npx remotion render MyComp out/video.mp4 --log=verbose
Defensive patterns

Strategy: validation

Validate before calling

// Smoke-test asset reachability from the render environment before rendering.
const ok = await fetch(gifUrl, {method: 'HEAD'}).then((r) => r.ok).catch(() => false);
if (!ok) throw new Error(`GIF unreachable from render env: ${gifUrl}`);

Try / catch

// In render code there is no UI; surface the failure with maximum context.
try {
  await renderMediaOnLambda({...});
} catch (err) {
  if (/Failed to render GIF/.test(String(err))) {
    throw new Error(`GIF render failed for ${gifUrl}. Re-run with --log=verbose. Cause: ${err}`);
  }
  throw err;
}

Prevention

When it happens

Trigger: `remotion render` of a composition with a `<Gif>` whose `src` returns 404/5xx, is unreachable from the render machine, or returns bytes that are not a valid GIF. Distinguished from 1042 only by the absence of a CORS signature on the error.

Common situations: The render machine (CI runner or Lambda) has no internet egress or the host is blocked; the asset URL is environment-specific and wrong in the render environment; a partially uploaded/corrupt GIF file on the origin; DNS resolution failure for the asset host.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/49f9f5d2c5c2a52b. Report an issue: GitHub.