remotion-dev/remotion · error · Error

Failed to create WebGL framebuffer

Error message

Failed to create WebGL framebuffer

What it means

Thrown by setupLinearProgressiveBlur() when gl.createFramebuffer() returns null. The ping-pong blur needs an FBO to render the horizontal pass into the intermediate texture before the vertical pass samples it, so a null framebuffer aborts the whole pipeline.

Source

Thrown at packages/effects/src/linear-progressive-blur/linear-progressive-blur-runtime.ts:175

		throw new Error('Failed to create WebGL buffer');
	}

	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 textureIntermediate = createRgbaTexture(gl);

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

	const w = Math.max(1, target.width);
	const h = Math.max(1, target.height);
	gl.bindTexture(gl.TEXTURE_2D, textureIntermediate);
	gl.texImage2D(
		gl.TEXTURE_2D,
		0,
		gl.RGBA,
		w,
		h,
		0,
		gl.RGBA,
		gl.UNSIGNED_BYTE,
		null,
	);
	gl.bindTexture(gl.TEXTURE_2D, null);

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Restart Chrome / the worker and retry once.
  2. Lower `--concurrency` / framesPerLambda so fewer FBOs are live.
  3. Force software rendering (`--gl=angle --angle-backend=swiftshader`).
  4. Raise Lambda memory if the GPU process is OOM-killed.
  5. Ensure effect cleanup releases the framebuffer between compositions.
Defensive patterns

Strategy: retry

Validate before calling

function canAllocateFramebuffer(canvas: HTMLCanvasElement): boolean {
  const gl = canvas.getContext('webgl2');
  if (!gl) return false;
  const fbo = gl.createFramebuffer();
  const ok = fbo !== null;
  if (fbo) gl.deleteFramebuffer(fbo);
  return ok;
}

Try / catch

try {
  renderWithLinearProgressiveBlur();
} catch (err) {
  if (err instanceof Error && err.message === 'Failed to create WebGL framebuffer') {
    await restartRendererWorker();
    renderWithLinearProgressiveBlur();
  } else throw err;
}

Prevention

When it happens

Trigger: WebGL2 context refuses framebuffer allocation — failing context, driver object limit, or GPU memory exhaustion. Framebuffer objects are a common casualty when the context is being torn down by a GPU-process crash.

Common situations: High-concurrency Lambda/local renders, long-running workers leaking FBOs, integrated GPUs under memory pressure, headless Chrome GPU process killed mid-render.

Related errors


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