remotion-dev/remotion · critical · Error

Metallic swirl program link failed: ${log ?? '(no log)'}

Error message

Metallic swirl program link failed: ${log ?? '(no log)'}

What it means

In `linkProgram`, both shaders compiled but `gl.getProgramParameter(program, gl.LINK_STATUS)` is false. The message includes the program info log. With the shipped vertex/fragment pair this should not occur; a link failure means the shader stages are incompatible (different GLSL versions, mismatched varyings, or a driver linker bug).

Source

Thrown at packages/brand/src/effects/metallic-swirl-effect.ts:494

};

const linkProgram = (
	gl: WebGL2RenderingContext,
	vs: WebGLShader,
	fs: WebGLShader,
): WebGLProgram => {
	const program = gl.createProgram();
	if (!program) {
		throw new Error('Failed to create WebGL program');
	}

	gl.attachShader(program, vs);
	gl.attachShader(program, fs);
	gl.linkProgram(program);
	if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
		const log = gl.getProgramInfoLog(program);
		gl.deleteProgram(program);
		throw new Error(`Metallic swirl program link failed: ${log ?? '(no log)'}`);
	}

	return program;
};

export const metallicSwirl = createEffect<
	MetallicSwirlParams,
	MetallicSwirlState
>({
	type: 'dev.remotion.brand.metallic-swirl',
	label: 'metallicSwirl()',
	documentationLink: null,
	backend: 'webgl2',
	calculateKey: (params) => {
		const r = resolve(params);
		return [
			'metallic-swirl',
			r.time,

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Read the program info log in the message to find the linker error.
  2. If you forked the shaders, ensure vertex output varyings match fragment inputs and both use GLSL ES 3.00 (`#version 300 es`).
  3. Update GPU drivers / try a different hardware-accelerated browser.
  4. Report unmodified-source link failures with the GPU/driver info to maintainers.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  metallicSwirl({speed: 1})(...);
} catch (err) {
  if (err instanceof Error && /Metallic swirl program link failed/.test(err.message)) {
    // log the info log, fall back to a non-shader effect
    console.error(err.message);
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: A modified or corrupted shader source where vertex and fragment varyings/uniforms no longer match; a driver linker bug on specific GPUs; mixing GLSL ES versions between the two stages after a fork.

Common situations: Forking the effect shaders without keeping vertex/fragment varying declarations in sync; buggy linkers on older mobile GPUs; transpiler/build steps that alter one shader string but not the other.

Related errors


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