remotion-dev/remotion · critical · Error
Failed to create WebGL vertex array
Error message
Failed to create WebGL vertex array
What it means
Thrown by the glow setup when gl.createVertexArray() returns null. The VAO holds the fullscreen quad attributes used by all four glow passes; null indicates context loss or GPU object exhaustion.
Source
Thrown at packages/effects/src/glow/glow-runtime.ts:149
const gl = target.getContext('webgl2', {
premultipliedAlpha: true,
alpha: true,
preserveDrawingBuffer: true,
});
if (!gl) {
throw createWebGL2ContextError('glow effect');
}
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
const programExtract = createProgram(gl, GLOW_VS, GLOW_EXTRACT_FS);
const programHorizontal = createProgram(gl, GLOW_VS, GLOW_BLUR_FS_HORIZONTAL);
const programVertical = createProgram(gl, GLOW_VS, GLOW_BLUR_FS_VERTICAL);
const programComposite = createProgram(gl, GLOW_VS, GLOW_COMPOSITE_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);
gl.enableVertexAttribArray(0);
gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 16, 0);View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Reduce concurrent WebGL effects.
- Retry on a fresh Chrome instance.
- Use a host with more GPU resources.
Defensive patterns
Strategy: retry
Try / catch
let effect;
for (let attempt = 0; attempt < 3; attempt++) {
try {
effect = glow(params);
break;
} catch (err) {
if (attempt === 2 || !/WebGL|vertex array/i.test(String(err))) throw err;
await new Promise((r) => setTimeout(r, 200 * (attempt + 1)));
}
} Prevention
- Reduce concurrent WebGL effects to free VAO objects.
- Render on a host with adequate GPU resources.
- Retry after a fresh Chrome launch to clear transient context loss.
When it happens
Trigger: Lost context before VAO creation; many concurrent WebGL effects exhausting VAO pools.
Common situations: Compositions with many WebGL layers; headless render under memory pressure.
Related errors
- Failed to create WebGL buffer
- Failed to create WebGL geometry
- Failed to create WebGL shader
- Failed to create WebGL program
- Failed to create WebGL texture
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/031b4cada20b0746.
Report an issue: GitHub.