remotion-dev/remotion · critical · Error
Flannel program link failed: ${log ?? '(no log)'}
Error message
Flannel program link failed: ${log ?? '(no log)'} What it means
Thrown when gl.linkProgram fails for the flannel program, with the GPU's info log appended. Link failure means the compiled shaders are individually valid but incompatible (e.g. varying/in-out mismatch, missing uniforms), pointing at a bug in the shipped shader pair.
Source
Thrown at packages/effects/src/flannel.ts:234
}
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
const vertexShader = compileShader(gl, gl.VERTEX_SHADER, FLANNEL_VS);
const fragmentShader = compileShader(gl, gl.FRAGMENT_SHADER, FLANNEL_FS);
const program = gl.createProgram();
if (!program) {
throw new Error('Failed to create WebGL program');
}
gl.attachShader(program, vertexShader);
gl.attachShader(program, fragmentShader);
gl.linkProgram(program);
gl.deleteShader(vertexShader);
gl.deleteShader(fragmentShader);
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const log = gl.getProgramInfoLog(program);
gl.deleteProgram(program);
throw new Error(`Flannel program link failed: ${log ?? '(no log)'}`);
}
const vao = gl.createVertexArray();
const vbo = gl.createBuffer();
if (!vao || !vbo) {
throw new Error('Failed to create WebGL geometry');
}
gl.bindVertexArray(vao);
gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
gl.bufferData(
gl.ARRAY_BUFFER,
new Float32Array([-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1]),
gl.STATIC_DRAW,
);
const aPos = gl.getAttribLocation(program, 'aPos');
const aUv = gl.getAttribLocation(program, 'aUv');
gl.enableVertexAttribArray(aPos);View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Inspect the appended info log for the mismatched symbol.
- Restore the shipped shader sources from a clean checkout if modified.
- File a Remotion bug with the log and GPU details if it reproduces on the released version.
Defensive patterns
Strategy: try-catch
Try / catch
try {
effect = flannel(params);
} catch (err) {
if (/program link failed/i.test(String(err))) {
console.error('Flannel link failure; info log:', String(err));
}
throw err;
} Prevention
- If you modify flannel shaders, keep vertex/fragment in/out declarations and uniforms matched.
- Restore shaders from a clean checkout when link errors appear after edits.
- Report persistent link failures with the info log and GPU details.
When it happens
Trigger: Vertex and fragment shaders declare mismatched in/out varyings; a uniform referenced in one stage is declared incorrectly in the other; tampered shader source.
Common situations: Editing FLANNEL_VS or FLANNEL_FS and forgetting to mirror an in/out declaration; environment where a GLSL qualifier is rejected at link time.
Related errors
- Flannel shader compile failed: ${log ?? '(no log)'}
- Glow program link failed: ${log ?? '(no log)'}
- Program link failed: ${log ?? '(no log)'}
- Burlap program link failed: ${log ?? '(no log)'}
- Failed to create WebGL shader
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/35f7585ef59f9e84.
Report an issue: GitHub.