remotion-dev/remotion · critical · Error
Program link failed: ${log ?? '(no log)'}
Error message
Program link failed: ${log ?? '(no log)'} What it means
The mirror effect's vertex and fragment shaders compiled successfully but failed to link into a complete WebGL program. gl.getProgramParameter(program, gl.LINK_STATUS) returned false, and the linker log is included. This indicates a mismatch between vertex shader outputs and fragment shader inputs, or a library-level shader defect — the shader sources are static and library-controlled.
Source
Thrown at packages/effects/src/mirror/mirror-runtime.ts:59
};
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(`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
- Report the linker log and GPU/driver details to the Remotion team — the shader pair is library-controlled.
- Update GPU drivers.
- Test on a different GPU or SwiftShader software renderer to isolate driver-specific linker bugs.
- On CI, ensure the headless browser has adequate WebGL2 program-linking support.
Defensive patterns
Strategy: try-catch
Try / catch
// Program link failures are driver/library bugs — catch and report
try {
// render with mirror effect
} catch (e) {
if (e instanceof Error && e.message.startsWith('Program link failed')) {
console.error('Mirror program link failed:', e.message);
// Fallback: render without the effect
} else {
throw e;
}
} Prevention
- Report program linker logs and GPU details to the Remotion team.
- Update GPU drivers to avoid linker bugs.
- Test on SwiftShader or alternative GPUs to isolate driver-specific issues.
When it happens
Trigger: During setupMirror, linkProgram attaches both compiled shaders, calls gl.linkProgram, and gl.getProgramParameter(program, gl.LINK_STATUS) returns false. The program info log from gl.getProgramInfoLog is surfaced in the message.
Common situations: GPU driver bugs in the program linker; varying/in-out declarations that mismatch on certain drivers; exceeding driver-specific uniform or attribute limits. Rarely caused by user input since the shaders are fixed within the library.
Related errors
- Shader compile failed: ${log ?? '(no log)'}
- Noise displacement shader compile failed: ${log ?? '(no log)
- Noise displacement 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/18efb741cc13f6be.
Report an issue: GitHub.