remotion-dev/remotion · critical · Error
Linear gradient tint shader compile failed: ${log ?? '(no lo
Error message
Linear gradient tint shader compile failed: ${log ?? '(no log)'} What it means
Thrown when the bundled GLSL for linearGradientTint fails `gl.compileShader`. The driver info log is included. Because the shaders are fixed and tested, a real failure points at a driver/compiler bug, a non-conformant WebGL2 implementation, or context corruption rather than a usage error.
Source
Thrown at packages/effects/src/linear-gradient-tint.ts:219
}
`;
const compileShader = (
gl: WebGL2RenderingContext,
type: number,
source: string,
): WebGLShader => {
const shader = gl.createShader(type);
if (!shader) {
throw new Error('Failed to create WebGL 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(
`Linear gradient tint shader compile failed: ${log ?? '(no log)'}`,
);
}
return shader;
};
const createProgram = (gl: WebGL2RenderingContext): WebGLProgram => {
const vs = compileShader(gl, gl.VERTEX_SHADER, VERTEX_SHADER);
const fs = compileShader(gl, gl.FRAGMENT_SHADER, FRAGMENT_SHADER);
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);View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Read the embedded `${log}` for the offending GLSL line/extension.
- Update or swap the GPU driver / Chromium build on the affected worker.
- Reproduce on the target driver to confirm it is environmental.
- Dispose and re-setup on `webglcontextrestored` if context loss is suspected.
- File a @remotion/effects issue with log + driver string if reproducible on current Chrome.
Defensive patterns
Strategy: try-catch
Try / catch
try {
setupLinearGradientTint(canvas);
} catch (err) {
reportShaderIssue(String(err?.message ?? ''));
renderWithoutEffect();
} Prevention
- Pin a known-good Chromium build on workers.
- Keep GPU drivers current; treat compile errors as environmental first.
- Capture the shader log when surfacing the error.
When it happens
Trigger: Non-conformant driver rejecting a valid shader; context loss during compile corrupting the result; precision/extension mismatch on a stripped stack.
Common situations: Old mobile GPU drivers; SwiftShader/LLVMpipe software rasterizers; virtualized GPUs; post-Chromium-update regressions on specific render workers.
Related errors
- Linear gradient tint program link failed: ${log ?? '(no log)
- Failed to create WebGL shader
- Checkerboard shader compile failed: ${log ?? '(no log)'}
- Failed to create WebGL shader
- Shader compile failed: ${log ?? '(no log)'}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/95a81e1a254c2e70.
Report an issue: GitHub.