remotion-dev/remotion · error · Error

Failed to create WebGL vertex array

Error message

Failed to create WebGL vertex array

What it means

Thrown by setupLinearProgressiveBlur() when gl.createVertexArray() returns null after the two programs and textures are built. The runtime needs a VAO to bind the fullscreen-quad attributes for both blur passes, so it aborts rather than drawing nothing.

Source

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

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

	gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);

	const programHorizontal = createProgram(
		gl,
		LINEAR_PROGRESSIVE_BLUR_VS,
		buildLinearProgressiveBlurFs('horizontal'),
	);
	const programVertical = createProgram(
		gl,
		LINEAR_PROGRESSIVE_BLUR_VS,
		buildLinearProgressiveBlurFs('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. Restart Chrome / the worker to recover a clean context and retry.
  2. Lower `--concurrency` / framesPerLambda.
  3. Force software rendering (`--gl=angle --angle-backend=swiftshader`).
  4. Raise host/Lambda memory if OOM-killed.
  5. Update GPU drivers / Chrome for persistent failures.
Defensive patterns

Strategy: retry

Validate before calling

function canAllocateVao(canvas: HTMLCanvasElement): boolean {
  const gl = canvas.getContext('webgl2');
  if (!gl) return false;
  const vao = gl.createVertexArray();
  const ok = vao !== null;
  if (vao) gl.deleteVertexArray(vao);
  return ok;
}

Try / catch

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

Prevention

When it happens

Trigger: WebGL2 context alive but refusing a VAO — failing context, driver object limit, or GPU memory exhaustion. Same family as the other null-GL-object errors, occurring late in setup after programs/textures already succeeded.

Common situations: High-concurrency renders, long-lived Studio sessions, GPU memory pressure, headless Chrome whose GPU process was OOM-killed.

Related errors


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