remotion-dev/remotion · critical · Error
Flannel shader compile failed: ${log ?? '(no log)'}
Error message
Flannel shader compile failed: ${log ?? '(no log)'} What it means
Thrown when the flannel GLSL fragment/vertex shader fails to compile. The error appends the GPU's info log, which pinpoints the offending line. This indicates a bug in the bundled shader source, a GLSL feature unsupported by the device, or a corrupted shader string.
Source
Thrown at packages/effects/src/flannel.ts:202
}
`;
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(`Flannel shader compile failed: ${log ?? '(no log)'}`);
}
return shader;
};
const setupFlannel = (target: HTMLCanvasElement): FlannelState => {
const gl = target.getContext('webgl2', {
premultipliedAlpha: true,
alpha: true,
preserveDrawingBuffer: true,
});
if (!gl) {
throw createWebGL2ContextError('flannel effect');
}
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);View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Read the appended info log to find the offending GLSL line.
- Report the issue with the full log and Chrome/GPU info to the Remotion maintainers if using a released version.
- Reproduce in Remotion Studio locally to confirm whether it is environment-specific.
Defensive patterns
Strategy: try-catch
Try / catch
try {
effect = flannel(params);
} catch (err) {
if (/shader compile failed/i.test(String(err))) {
console.error('Flannel shader compile failure; report log:', String(err));
}
throw err;
} Prevention
- If you fork/edit the flannel shader, mirror GLSL ES 300 syntax exactly and test in Remotion Studio first.
- Capture and forward the GPU info log when reporting issues.
- Pin a known-good Remotion version if a regression is suspected.
When it happens
Trigger: A bug in the shipped FLANNEL_VS/FLANNEL_FS source (regression after editing); a device/driver that rejects a GLSL ES 3.00 construct used by the shader; the shader string was inadvertently truncated.
Common situations: Developing the flannel shader and introducing a syntax error; running on an older GPU whose GLSL ES 300 support is partial; an extension was disabled that the shader relies on.
Related errors
- Flannel program link failed: ${log ?? '(no log)'}
- Glow shader compile failed: ${log ?? '(no log)'}
- Shader compile failed: ${log ?? '(no log)'}
- Burlap shader compile 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/7b2127bf52a6c761.
Report an issue: GitHub.