remotion-dev/remotion · critical · Error
Lines shader compile failed: ${log ?? '(no log)'}
Error message
Lines shader compile failed: ${log ?? '(no log)'} What it means
A plain Error thrown by compileShader in the Lines effect when gl.getShaderParameter(shader, gl.COMPILE_STATUS) is false. The shader is deleted and the info log is appended, so the message contains the GLSL compiler output. The shaders (LINES_VS / LINES_FS) are static library strings, so a compile failure almost always points to a GPU/driver incompatibility rather than user input.
Source
Thrown at packages/effects/src/lines.ts:315
}
`;
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(`Lines shader compile failed: ${log ?? '(no log)'}`);
}
return shader;
};
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);View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Read the info log embedded in the error message to identify the rejected GLSL line/feature.
- Update the GPU driver / browser / Chromium build used by Remotion to render.
- If on a known-bad GPU, try a different GL backend (e.g. --use-angle=gl or swiftshader).
- Report the driver + info log to the Remotion maintainers since the shader source is fixed library code.
Defensive patterns
Strategy: try-catch
Try / catch
try {
lines(...);
} catch (err) {
if (err instanceof Error && /shader compile failed/.test(err.message)) {
// log err.message (contains the GLSL info log) and switch backend/driver
} else throw err;
} Prevention
- Keep GPU drivers and the Chromium build current.
- Capture and log the info log from the error message to identify driver-specific failures.
- Test the Lines effect on the target device class before relying on it in production.
When it happens
Trigger: The device's GLSL ES 3.00 compiler rejects a construct in the bundled Lines shaders — e.g. a driver bug around precision, texture(), or integer uniforms. Cannot be triggered by lines() params because the shader source does not interpolate user strings.
Common situations: Outdated mobile GPU drivers, buggy software GL implementations, or a browser/OS combo with known WebGL2 shader-compiler regressions. Read the captured info log in the error message to confirm the driver-specific cause.
Related errors
- Lines program link failed: ${log ?? '(no log)'}
- Liquid contours shader compile failed: ${log ?? '(no log)'}
- Shader compile failed: ${log ?? '(no log)'}
- Program link failed: ${log ?? '(no log)'}
- Burlap shader compile failed: ${log ?? '(no log)'}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/7ad7e129b356a117.
Report an issue: GitHub.