{"record":{"id":"3e858c24c0affd15","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-vertex-array-3e858c","errorCode":null,"errorMessage":"Failed to create WebGL vertex array","messagePattern":"Failed to create WebGL vertex array","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/emboss.ts","lineNumber":324,"sourceCode":"\t\tpremultipliedAlpha: true,\n\t\talpha: true,\n\t\tpreserveDrawingBuffer: true,\n\t});\n\tif (!gl) {\n\t\tthrow createWebGL2ContextError('emboss effect');\n\t}\n\n\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\n\tconst vs = compileShader(gl, gl.VERTEX_SHADER, EMBOSS_VS);\n\tconst fs = compileShader(gl, gl.FRAGMENT_SHADER, EMBOSS_FS);\n\tconst program = linkProgram(gl, vs, fs);\n\tgl.deleteShader(vs);\n\tgl.deleteShader(fs);\n\n\tconst vao = gl.createVertexArray();\n\tif (!vao) {\n\t\tthrow new Error('Failed to create WebGL vertex array');\n\t}\n\n\tgl.bindVertexArray(vao);\n\n\tconst data = new Float32Array([\n\t\t-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1,\n\t]);\n\n\tconst vbo = gl.createBuffer();\n\tif (!vbo) {\n\t\tthrow new Error('Failed to create WebGL buffer');\n\t}\n\n\tgl.bindBuffer(gl.ARRAY_BUFFER, vbo);\n\tgl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\n\n\tconst aPos = gl.getAttribLocation(program, 'aPos');\n\tconst aUv = gl.getAttribLocation(program, 'aUv');","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/emboss.ts#L306-L342","documentation":"Thrown by setupEmboss() when gl.createVertexArray() returns null right after the program was linked. The shaders and program succeeded, so a null VAO means the driver could not allocate a vertex-array object, per spec indicating a lost context or resource exhaustion.","triggerScenarios":"First-frame setup of emboss() on a Chrome GPU process that has lost the context or hit its VAO budget before the geometry could be set up.","commonSituations":"Headless/CI Chrome without a healthy GPU, too many concurrent WebGL2 contexts, or a driver reset during render.","solutions":["Render with a software backend: `npx remotion render <comp> --gl=swiftshader`.","Reduce concurrency so the per-frame context is not starved.","Restart the render worker to clear a lost context.","Update the GPU driver / Chromium build."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"async function safeRender(opts) {\n  try {\n    return await renderMedia(opts);\n  } catch (err) {\n    if (/Failed to create WebGL vertex array/.test(String(err?.message ?? ''))) {\n      return await renderMedia({...opts, gl: 'swiftshader', concurrency: 1});\n    }\n    throw err;\n  }\n}","preventionTips":["Render with a software GL backend when the GPU is unreliable.","Cap concurrency so each frame's WebGL objects fit within the GPU budget.","Relaunch Chrome / the render worker to recover from a lost context.","Update the GPU driver / Chromium build."],"tags":["webgl","gpu","rendering","effects","runtime"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}