remotion-dev/remotion · error · Error
Color key program link failed: ${log ?? '(no log)'}
Error message
Color key program link failed: ${log ?? '(no log)'} What it means
Thrown by linkProgram in the color key effect when gl.getProgramParameter(program, LINK_STATUS) is false. Both color key shaders compiled, but linking into a program failed; the driver's program info log is appended. For bundled shaders this is normally a driver/version incompatibility rather than a parameter issue.
Source
Thrown at packages/effects/src/color-key.ts:222
};
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(`Color key 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
- Inspect the info log for the exact link error (e.g. unresolved attribute/uniform).
- Upgrade the GPU driver and Chromium/Chrome build used to render.
- Switch from software GL to a GPU-enabled environment.
- File a Remotion issue with driver, Chrome version, and the log; shaders are library-controlled.
Defensive patterns
Strategy: try-catch
Try / catch
try {
await renderMedia({...});
} catch (err) {
const msg = String(err);
if (/Color key program link failed/i.test(msg)) {
// link failure is driver/version-specific; report and switch environment
throw new Error(`Color-key program link failed. Log: ${msg}`);
}
throw err;
} Prevention
- Pin a known-good Chromium version and keep GPU drivers updated.
- Avoid software GL for renders that use color key.
- Capture the linker log on failure and report it to Remotion with environment details.
- Validate renders in the production render environment, not only locally.
When it happens
Trigger: At color-key.ts:222 inside linkProgram after COLOR_KEY_VS and COLOR_KEY_FS were compiled and attached. Linking failed and the info log (or '(no log)') is included.
Common situations: A GL driver or Chromium version that compiles but fails to link the bundled shaders, software GL with non-standard behavior, or a degraded context.
Related errors
- Color correction shader link failed: ${log ?? '(no log)'}
- Color key shader compile failed: ${log ?? '(no log)'}
- Color correction shader compile failed: ${log ?? '(no log)'}
- Failed to create WebGL shader
- Checkerboard shader compile failed: ${log ?? '(no log)'}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/1e18cc75b527ecca.
Report an issue: GitHub.