remotion-dev/remotion · error · Error
Failed to create WebGL program
Error message
Failed to create WebGL program
What it means
Thrown by linkProgram() in the linear-progressive-blur runtime when gl.createProgram() returns null after both shaders compiled. The runtime needs two programs (horizontal and vertical passes); a null program object aborts setup because linking cannot proceed.
Source
Thrown at packages/effects/src/linear-progressive-blur/linear-progressive-blur-runtime.ts:62
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
const log = gl.getShaderInfoLog(shader);
gl.deleteShader(shader);
throw new Error(
`Linear progressive blur 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);
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const log = gl.getProgramInfoLog(program);
gl.deleteProgram(program);
throw new Error(
`Linear progressive blur program link failed: ${log ?? '(no log)'}`,
);
}
return program;
};
const createProgram = (
gl: WebGL2RenderingContext,View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Restart Chrome / the render worker and retry once.
- Reduce `--concurrency` / framesPerLambda to lower simultaneous GL object pressure.
- Force software rendering (`--gl=angle --angle-backend=swiftshader`).
- Ensure surrounding effects run their cleanup path so programs are released.
- Update GPU drivers / Chrome for persistent failures.
Defensive patterns
Strategy: retry
Validate before calling
function canAllocateProgram(canvas: HTMLCanvasElement): boolean {
const gl = canvas.getContext('webgl2');
if (!gl) return false;
const p = gl.createProgram();
const ok = p !== null;
if (p) gl.deleteProgram(p);
return ok;
} Try / catch
try {
renderWithLinearProgressiveBlur();
} catch (err) {
if (err instanceof Error && err.message === 'Failed to create WebGL program') {
await restartRendererWorker();
renderWithLinearProgressiveBlur();
} else throw err;
} Prevention
- Reduce concurrency — this effect allocates two programs (horizontal + vertical).
- Run effect cleanup to release programs between compositions.
- Recycle workers after GPU-process crashes.
- Force software rendering on unstable GPUs.
When it happens
Trigger: WebGL2 context in a failing state or at its internal object limit while still accepting shaders. Same root causes as the other GL null-allocations, compounded because this effect creates two programs.
Common situations: Memory pressure on the GPU; concurrent renders saturating driver object tables; a crashed GPU process leaving a half-dead context; long-running Studio sessions leaking programs.
Related errors
- Failed to create WebGL shader
- Failed to create WebGL program
- Failed to create WebGL vertex array
- Failed to create WebGL buffer
- Failed to create WebGL shader
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/545a10d59168bb3c.
Report an issue: GitHub.