remotion-dev/remotion · critical · Error

Failed to create WebGL framebuffer

Error message

Failed to create WebGL framebuffer

What it means

The radial-progressive-blur runtime creates a framebuffer object (FBO) to render the intermediate blur pass off-screen. If gl.createFramebuffer() returns null, the context cannot provide the render target, usually because it is lost or its object pool is exhausted.

Source

Thrown at packages/effects/src/radial-progressive-blur/radial-progressive-blur-runtime.ts:181

		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. Listen for and handle context loss/restoration events
  2. Dispose of effects and their FBOs when no longer needed
  3. Reduce the count of concurrent WebGL2 effects using off-screen buffers
  4. Render on a GPU with a larger framebuffer object limit
Defensive patterns

Strategy: retry

Try / catch

canvas.addEventListener('webglcontextlost', (e) => { e.preventDefault(); }, false);
canvas.addEventListener('webglcontextrestored', () => {
  // re-initialize effects, re-creating framebuffers
}, false);

Prevention

When it happens

Trigger: Calling setupRadialProgressiveBlur() on a context that has been lost or that has exhausted its framebuffer object allocation.

Common situations: Mobile GPUs with tight FBO limits; accumulated GL resource leaks; GPU process crash causing context loss; too many off-screen render passes across concurrent effects.

Related errors


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