remotion-dev/remotion · critical · Error

Thermal vision program link failed: ${log ?? '(no log)'}

Error message

Thermal vision program link failed: ${log ?? '(no log)'}

What it means

The thermal vision effect's shader program failed to link after both shaders compiled successfully. `gl.LINK_STATUS === false` and the program info log is appended. Linking fails when vertex/fragment interface declarations mismatch or due to driver-specific linking bugs. Since shaders are static library code, this typically indicates a driver issue. The program is deleted before throwing.

Source

Thrown at packages/effects/src/thermal-vision.ts:188

};

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(`Thermal vision program link failed: ${log ?? '(no log)'}`);
	}

	return program;
};

const createProgram = (
	gl: WebGL2RenderingContext,
	vertexSource: string,
	fragmentSource: string,
): WebGLProgram => {
	const vs = compileShader(gl, gl.VERTEX_SHADER, vertexSource);
	const fs = compileShader(gl, gl.FRAGMENT_SHADER, fragmentSource);
	const program = linkProgram(gl, vs, fs);
	gl.deleteShader(vs);
	gl.deleteShader(fs);
	return program;
};

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Read the info log in the message for the linker's complaint.
  2. Update GPU drivers and browser.
  3. If editing shaders, ensure vertex `out` declarations exactly match fragment `in` declarations (names, types, order).
  4. Test on another machine/browser; report to maintainers if shaders are unmodified.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  thermalVision({...params});
} catch (e) {
  const msg = (e as Error).message;
  if (/program link failed/.test(msg)) {
    console.error('Linker failure (likely driver bug):', msg);
    renderFallbackFrame();
  } else throw e;
}

Prevention

When it happens

Trigger: A driver linking bug; a varying/interface mismatch introduced by editing the shader strings; exceeding a driver-specific uniform/varying limit.

Common situations: Outdated mobile/integrated GPU drivers; software WebGL2 backends with linking quirks; a regression from modifying `THERMAL_VISION_VS` or `THERMAL_VISION_FS` (e.g. renaming a varying in only one shader stage).

Related errors


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