remotion-dev/remotion · critical · Error

Failed to create WebGL vertex array

Error message

Failed to create WebGL vertex array

What it means

The radial-progressive-blur runtime creates a Vertex Array Object (VAO) to encapsulate vertex attribute bindings. If gl.createVertexArray() returns null, the GL context cannot allocate the object, typically because the context is lost or resource limits are exceeded.

Source

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

		throw createWebGL2ContextError('radial progressive blur effect');
	}

	gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);

	const programHorizontal = createProgram(
		gl,
		RADIAL_PROGRESSIVE_BLUR_VS,
		buildRadialProgressiveBlurFs('horizontal'),
	);
	const programVertical = createProgram(
		gl,
		RADIAL_PROGRESSIVE_BLUR_VS,
		buildRadialProgressiveBlurFs('vertical'),
	);

	const vao = gl.createVertexArray();
	if (!vao) {
		throw new Error('Failed to create WebGL vertex array');
	}

	gl.bindVertexArray(vao);

	const data = new Float32Array([
		-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1,
	]);

	const vbo = gl.createBuffer();
	if (!vbo) {
		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);

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Register a 'webglcontextlost' handler and reinitialize after 'webglcontextrestored'
  2. Audit the composition for unreleased WebGL effects that leak VAOs
  3. Reduce the number of simultaneous WebGL2 effects
  4. Restart the render in a fresh browser/Headless Chrome process
Defensive patterns

Strategy: retry

Try / catch

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

Prevention

When it happens

Trigger: Calling setupRadialProgressiveBlur() after context loss, under severe GPU resource pressure, or on a context where too many VAOs are already outstanding.

Common situations: Mobile GPU drivers with low VAO limits; long-running sessions with leaks of GL objects; contexts in a lost state after a GPU crash.

Related errors


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