remotion-dev/remotion · error · Error
Color correction shader compile failed: ${log ?? '(no log)'}
Error message
Color correction shader compile failed: ${log ?? '(no log)'} What it means
Thrown by compileShader in the color correction effect when gl.getShaderParameter(shader, COMPILE_STATUS) is false. The shader source failed to compile on the active GL driver, and the driver's info log is included. Because the GLSL is bundled with the library, a compile failure almost always indicates a driver/GPU incompatibility or a context in a degraded state, not a user parameter.
Source
Thrown at packages/effects/src/color-correction.ts:319
}
`;
const compileShader = (
gl: WebGL2RenderingContext,
type: number,
source: string,
): WebGLShader => {
const shader = gl.createShader(type);
if (!shader) {
throw new Error('Failed to create color correction shader');
}
gl.shaderSource(shader, source);
gl.compileShader(shader);
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
const log = gl.getShaderInfoLog(shader);
gl.deleteShader(shader);
throw new Error(
`Color correction shader compile failed: ${log ?? '(no log)'}`,
);
}
return shader;
};
const createProgram = (gl: WebGL2RenderingContext): WebGLProgram => {
const vertexShader = compileShader(gl, gl.VERTEX_SHADER, VERTEX_SHADER);
const fragmentShader = compileShader(gl, gl.FRAGMENT_SHADER, FRAGMENT_SHADER);
const program = gl.createProgram();
if (!program) {
throw new Error('Failed to create color correction shader program');
}
gl.attachShader(program, vertexShader);
gl.attachShader(program, fragmentShader);
gl.linkProgram(program);View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Read the info log in the error message; it names the offending GLSL line/directive.
- Update the GPU driver and/or the Chromium build used for rendering.
- If on software GL, switch to a GPU-enabled render environment (GPU Lambda layer / --enable-gpu).
- Report the driver, Chrome version, and log to Remotion if the shader is unchanged — it is a library/driver compatibility bug.
Defensive patterns
Strategy: try-catch
Try / catch
try {
await renderMedia({...});
} catch (err) {
const msg = String(err);
if (/Color correction shader compile failed/i.test(msg)) {
// driver/shader incompatibility: surface the info log and switch environments
throw new Error(`Color-correction shader rejected by driver. Log: ${msg}`);
}
throw err;
} Prevention
- Keep GPU drivers and the Chromium render build up to date.
- Avoid software GL (SwiftShader) where bundled shaders may exceed limits; use a GPU environment.
- When a compile log appears, file a Remotion issue with driver and Chrome version rather than editing library GLSL.
- Pin a known-good Chrome/Chromium version in CI and Lambda.
When it happens
Trigger: Inside compileShader at color-correction.ts:319 for the color-correction VERTEX_SHADER or FRAGMENT_SHADER. The driver rejected the GLSL ES 3.00 source; the info log (or '(no log)') is appended. Not parameter-driven.
Common situations: A GPU/driver or headless Chrome version that rejects a GLSL construct in the bundled shader, software GL (SwiftShader) with stricter limits, an outdated Chromium, or a context that reports success on creation but is effectively broken.
Related errors
- Color correction shader link failed: ${log ?? '(no log)'}
- Color key shader compile failed: ${log ?? '(no log)'}
- Color key program link 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/c6b560df1b183c1c.
Report an issue: GitHub.