remotion-dev/remotion · error · Error
Failed to link program: ${log}
Error message
Failed to link program: ${log} What it means
Thrown when gl.linkProgram() fails, i.e. the vertex and fragment shaders compiled but could not be linked together (e.g. varying mismatch, uniform conflicts, or driver limits). The program is deleted before throwing. The shader log from getProgramInfoLog() is included in the message.
Source
Thrown at packages/transitions/src/presentations/blur-slide.tsx:136
const createProgram = (
gl: WebGL2RenderingContext,
fragmentShader: string,
): WebGLProgram => {
const program = gl.createProgram();
if (!program) {
throw new Error('Failed to create WebGL program');
}
const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);
const fs = compileShader(gl, fragmentShader, gl.FRAGMENT_SHADER);
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(`Failed to link program: ${log}`);
}
return program;
};
const createTexture = (gl: WebGL2RenderingContext): WebGLTexture => {
const tex = gl.createTexture();
if (!tex) {
throw new Error('Failed to create texture');
}
gl.bindTexture(gl.TEXTURE_2D, tex);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
gl.texImage2D(
gl.TEXTURE_2D,View on GitHub (pinned to b2f4e34732)
Solutions
- Read the ${log} in the message for the GLSL linker's exact complaint
- Update GPU drivers / enable hardware acceleration so a capable WebGL2 driver is used
- If shader sources were customized, verify varyings (names, types, precision) match between vertex and fragment shaders
- Try a different browser/device to rule out a driver-specific linker bug
Defensive patterns
Strategy: try-catch
Validate before calling
null
Try / catch
try {
const slide = blurSlide(props);
} catch (err) {
if (String(err).startsWith('Failed to link program')) {
// log full GLSL linker log, try alternate device/browser or fallback presentation
}
} Prevention
- Do not modify the built-in shader sources unless varying declarations stay consistent
- Keep GPU drivers up to date; enable hardware acceleration
- Test transitions in target browsers early
- Provide a DOM-based fallback presentation
When it happens
Trigger: Calling blurSlide() where the VERTEX_SHADER and SLIDE/BLUR fragment shaders disagree on varyings/precision, or the GPU driver refuses to link due to limits or a driver bug.
Common situations: Driver-specific linking bugs (especially software renderers or older ANGLE builds); editing the shader source and introducing mismatched varyings; GPU with low uniform/varying limits.
Related errors
- Failed to create WebGL shader
- Checkerboard shader compile failed: ${log ?? '(no log)'}
- Failed to create WebGL shader
- Shader compile failed: ${log ?? '(no log)'}
- Color correction shader compile failed: ${log ?? '(no log)'}
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09).
Data as JSON: /api/errors/3b64097bd8fd2183.
Report an issue: GitHub.