remotion-dev/remotion · error · Error
Failed to create WebGL vertex array
Error message
Failed to create WebGL vertex array
What it means
During setupOutline(), gl.createVertexArray() returned null, meaning the WebGL2 context cannot allocate a VAO - a lost context is the only spec-level cause. The outline effect uses the VAO to bind its fullscreen-quad vertex buffer, so setup aborts before any drawing happens.
Source
Thrown at packages/effects/src/outline.ts:360
}
};
const setupOutline = (target: HTMLCanvasElement): OutlineState => {
const gl = target.getContext('webgl2', {
premultipliedAlpha: true,
alpha: true,
preserveDrawingBuffer: true,
});
if (!gl) {
throw createWebGL2ContextError('outline effect');
}
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
const program = createProgram(gl);
const vao = gl.createVertexArray();
if (!vao) {
throw new Error('Failed to create WebGL vertex array');
}
gl.bindVertexArray(vao);
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,
new Float32Array([-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1]),
gl.STATIC_DRAW,
);
const aPos = gl.getAttribLocation(program, 'aPos');
const aUv = gl.getAttribLocation(program, 'aUv');
gl.enableVertexAttribArray(aPos);View on GitHub (pinned to 10db9de073)
Solutions
- Re-run the render - fresh page, fresh context
- Lower --concurrency to reduce simultaneous WebGL state per Chrome profile
- Update Chrome and GPU drivers
- Report persistent, deterministic reproduction to Remotion with Chrome version details
Defensive patterns
Strategy: retry
Try / catch
try {
await renderMedia({composition, codec: 'h264'});
} catch (err) {
if (err instanceof Error && err.message === 'Failed to create WebGL vertex array') {
await renderMedia({composition, codec: 'h264'}); // fresh page -> fresh context
} else {
throw err;
}
} Prevention
- Keep concurrent WebGL-heavy frames low
- Use a fresh Chrome instance per render job in CI
- Update GPU drivers when the error recurs on the same host
When it happens
Trigger: Applying outline() on a lost/degraded WebGL2 context, typically after heavy GPU object churn in the same page (many effect setups in a concurrent render).
Common situations: Long concurrent renders with many outline() frames; GPU resets; memory pressure in headless Chrome. Nearly always environmental, not compositional.
Related errors
- Failed to create WebGL shader
- Failed to create WebGL program
- Failed to create WebGL buffer
- Outline shader compile failed: ${log ?? '(no log)'}
- Outline program link failed: ${log ?? '(no log)'}
AI-assisted analysis of remotion-dev/remotion@10db9de073 (2026-08-22).
Data as JSON: /api/errors/c91fd3bb57dc14e2.
Report an issue: GitHub.