remotion-dev/remotion · critical · Error

Failed to create WebGL framebuffer

Error message

Failed to create WebGL framebuffer

What it means

Thrown by the glow setup when gl.createFramebuffer() returns null. The framebuffer is the offscreen render target that lets the blur passes ping-pong between textureGlowA and textureGlowB; null indicates context loss or framebuffer-object exhaustion.

Source

Thrown at packages/effects/src/glow/glow-runtime.ts:179

	}

	gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
	gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);

	gl.enableVertexAttribArray(0);
	gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 16, 0);
	gl.enableVertexAttribArray(1);
	gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 16, 8);

	gl.bindVertexArray(null);

	const textureSource = createRgbaTexture(gl);
	const textureGlowA = createRgbaTexture(gl);
	const textureGlowB = createRgbaTexture(gl);

	const framebuffer = gl.createFramebuffer();
	if (!framebuffer) {
		throw new Error('Failed to create WebGL framebuffer');
	}

	const colorCanvas = document.createElement('canvas');
	colorCanvas.width = 1;
	colorCanvas.height = 1;
	const colorCtx = colorCanvas.getContext('2d', {willReadFrequently: true});
	if (!colorCtx) {
		throw new Error('Failed to acquire 2D context for color parsing');
	}

	return {
		gl,
		programExtract,
		programHorizontal,
		programVertical,
		programComposite,
		vao,
		vbo,

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Reduce concurrent glow effects.
  2. Retry on a fresh Chrome instance.
  3. Use a host with more GPU resources.
Defensive patterns

Strategy: retry

Try / catch

let effect;
for (let attempt = 0; attempt < 3; attempt++) {
  try {
    effect = glow(params);
    break;
  } catch (err) {
    if (attempt === 2 || !/WebGL|framebuffer/i.test(String(err))) throw err;
    await new Promise((r) => setTimeout(r, 200 * (attempt + 1)));
  }
}

Prevention

When it happens

Trigger: Lost context before framebuffer creation; many glow effects each needing their own FBO; driver with strict FBO limits.

Common situations: Stacking multiple glow layers in one composition; headless render near GPU object limits.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/4aed4ca8207c54ee. Report an issue: GitHub.