remotion-dev/remotion · critical · Error
Failed to create WebGL vertex array
Error message
Failed to create WebGL vertex array
What it means
During starburst effect `setup`, `gl.createVertexArray()` returned `null`. A vertex array object (VAO) could not be allocated, indicating context loss or GL resource exhaustion. The error fires after the program is linked and shaders are deleted, before geometry is uploaded.
Source
Thrown at packages/effects/src/starburst.ts:303
premultipliedAlpha: true,
alpha: true,
preserveDrawingBuffer: true,
});
if (!gl) {
throw createWebGL2ContextError('starburst effect');
}
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
const vs = compileShader(gl, gl.VERTEX_SHADER, STARBURST_VS);
const fs = compileShader(gl, gl.FRAGMENT_SHADER, STARBURST_FS);
const program = linkProgram(gl, vs, fs);
gl.deleteShader(vs);
gl.deleteShader(fs);
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);
const aPos = gl.getAttribLocation(program, 'aPos');
const aUv = gl.getAttribLocation(program, 'aUv');View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Lower the number of concurrent webgl2 effects.
- Restart the render/Studio to reset GL state.
- Verify headless browser WebGL2 support.
- Handle `webglcontextlost` to recreate contexts before re-running setup.
Defensive patterns
Strategy: fallback
Try / catch
try {
starburst({...params});
} catch (e) {
if (/Failed to create WebGL vertex array/.test((e as Error).message)) {
renderFallbackFrame();
} else throw e;
} Prevention
- Reduce concurrent webgl2 effects to limit VAO allocation pressure.
- Listen for `webglcontextlost` and rebuild VAOs on restore.
- Restart long-running sessions to release leaked GL resources.
When it happens
Trigger: Context lost between program linking and VAO creation; driver out of VAO resources; WebGL2 context in a destroyed state.
Common situations: High concurrent webgl2 effect count; long sessions after a driver reset; restrictive headless WebGL2 backends.
Related errors
- Failed to create WebGL shader
- Failed to create WebGL program
- Failed to create WebGL buffer
- Failed to create WebGL palette texture
- Failed to create WebGL vertex array
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/aed84b927e095812.
Report an issue: GitHub.