remotion-dev/remotion · critical · Error
Shader compile failed: ${log ?? '(no log)'}
Error message
Shader compile failed: ${log ?? '(no log)'} What it means
Thrown by the blur effect's `compileShader` when the shader source compiled with a falsy COMPILE_STATUS. The message embeds the driver's info log. Because the GLSL lives in `blur-shaders.ts` (library constants), a compile failure means a shader regression or a GLSL ES 3.00 feature the driver does not accept.
Source
Thrown at packages/effects/src/blur/blur-runtime.ts:46
};
};
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(`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 — it points to the exact line/column of the GLSL error.
- Update @remotion/effects to the latest version; shader bugs are patched upstream.
- Reproduce on a discrete GPU and a different browser to isolate driver-specific rejection.
- In headless CI, verify the GL_RENDERER string and that WebGL2 is hardware-backed.
Example fix
// Not fixable by callers — BLUR_VS / BLUR_FS_* are library constants. // Capture the info log from the thrown error and report it upstream with: console.error(gl.getParameter(gl.RENDERER), gl.getParameter(gl.SHADING_LANGUAGE_VERSION));
Defensive patterns
Strategy: fallback
Validate before calling
// Probe compile capability with a trivial shader before setup.
const probe = gl.createShader(gl.FRAGMENT_SHADER);
if (!probe) { /* skip */ }
gl.shaderSource(probe, 'void main(){}');
gl.compileShader(probe);
const ok = gl.getShaderParameter(probe, gl.COMPILE_STATUS);
gl.deleteShader(probe);
if (!ok) { /* fall back */ } Try / catch
try {
const state = setupBlur(canvas);
} catch (err) {
if (/Shader compile failed/.test(err.message)) {
// log err (contains info log), fall back to a non-WebGL effect
} else { throw err; }
} Prevention
- Pin @remotion/effects to a tested version.
- Log GL_RENDERER and SHADING_LANGUAGE_VERSION alongside errors.
- Keep a CPU/2D fallback for shader-incompatible environments.
When it happens
Trigger: Fires at line 46 after `gl.compileShader` when `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` is falsy. Affects BLUR_VS, BLUR_FS_HORIZONTAL, or BLUR_FS_VERTICAL.
Common situations: A new blur shader revision ships with a syntax/type error; a driver rejects a construct (e.g. certain loop bounds, precision qualifiers) on older hardware; headless software rasterizer in CI with weaker GLSL support; truncated shader string from a broken build.
Related errors
- Program link failed: ${log ?? '(no log)'}
- Burlap shader compile failed: ${log ?? '(no log)'}
- Starburst shader compile failed: ${log ?? '(no log)'}
- Thermal vision shader compile failed: ${log ?? '(no log)'}
- Burlap program link failed: ${log ?? '(no log)'}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/52c39ae6a5a2a18e.
Report an issue: GitHub.