remotion-dev/remotion · error · Error
Failed to create WebGL vertex array
Error message
Failed to create WebGL vertex array
What it means
Thrown by setupVenetianBlinds when gl.createVertexArray() returns null after the shader program was successfully built and linked. A null VAO means the GL context is lost or cannot allocate another vertex array object. The library fails immediately since rendering requires a valid VAO to bind vertex attributes.
Source
Thrown at packages/effects/src/venetian-blinds.ts:254
alpha: true,
preserveDrawingBuffer: true,
});
if (!gl) {
throw createWebGL2ContextError('venetian blinds effect');
}
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
const vs = compileShader(gl, gl.VERTEX_SHADER, VENETIAN_BLINDS_VS);
const fs = compileShader(gl, gl.FRAGMENT_SHADER, VENETIAN_BLINDS_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
- Reduce render concurrency to lower simultaneous GL context count
- Handle webglcontextlost and retry the render after restoration
- Update GPU drivers
- Use a GPU with higher resource limits for server-side rendering
Defensive patterns
Strategy: try-catch
Try / catch
try {
const state = setupVenetianBlinds(canvas);
} catch (err) {
if (err instanceof Error && err.message === 'Failed to create WebGL vertex array') {
throw new Error('WebGL2 context lost or VAO limit reached for venetian-blinds. Retry render.');
}
throw err;
} Prevention
- Reduce concurrent render processes to stay within the GPU's VAO allocation budget
- Handle webglcontextlost and retry renders after restoration
- Restart long-running render browser instances to reclaim leaked GL objects
When it happens
Trigger: After compileShader and linkProgram succeed, gl.createVertexArray() returns null. Occurs under context loss or when the driver's VAO allocation limit is reached.
Common situations: Too many concurrent effects/contexts exhausting the driver's VAO pool; context loss after a GPU reset; software rendering with limited object support.
Related errors
- Failed to create WebGL shader
- Failed to create WebGL program
- Failed to create WebGL buffer
- Failed to create WebGL texture
- Failed to create WebGL vertex array
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/8c3a24535454c3f5.
Report an issue: GitHub.