{"record":{"id":"b9601c5b3ebb2b49","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-shader-b9601c","errorCode":null,"errorMessage":"Failed to create WebGL shader","messagePattern":"Failed to create WebGL shader","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/glow/glow-runtime.ts","lineNumber":57,"sourceCode":"\t};\n\treadonly composite: {\n\t\treadonly uSource: WebGLUniformLocation | null;\n\t\treadonly uGlow: WebGLUniformLocation | null;\n\t\treadonly uIntensity: WebGLUniformLocation | null;\n\t};\n\treadonly colorCtx: CanvasRenderingContext2D;\n\tcachedColorStr: string;\n\tcachedColorRgba: ParsedColorRgba;\n};\n\nconst compileShader = (\n\tgl: WebGL2RenderingContext,\n\ttype: number,\n\tsource: string,\n): WebGLShader => {\n\tconst shader = gl.createShader(type);\n\tif (!shader) {\n\t\tthrow new Error('Failed to create WebGL shader');\n\t}\n\n\tgl.shaderSource(shader, source);\n\tgl.compileShader(shader);\n\tif (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n\t\tconst log = gl.getShaderInfoLog(shader);\n\t\tgl.deleteShader(shader);\n\t\tthrow new Error(`Glow shader compile failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn shader;\n};\n\nconst linkProgram = (\n\tgl: WebGL2RenderingContext,\n\tvs: WebGLShader,\n\tfs: WebGLShader,\n): WebGLProgram => {","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/glow/glow-runtime.ts#L39-L75","documentation":"Thrown by compileShader in the glow effect when gl.createShader() returns null. Same GPU-level failure class as the flannel shader allocation: context lost, invalid type, or resource exhaustion. Shader source problems surface as 612 instead.","triggerScenarios":"Calling glow() on a lost WebGL2 context; concurrent WebGL effects exhausting shader object pools; driver bug refusing allocation.","commonSituations":"Many glow layers in one composition; Lambda/headless render under memory pressure; resumed after GPU reset.","solutions":["Reduce the number of concurrent WebGL effects.","Retry on a fresh Chrome instance.","Use a host with healthier GPU resources."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"let effect;\nfor (let attempt = 0; attempt < 3; attempt++) {\n  try {\n    effect = glow(params);\n    break;\n  } catch (err) {\n    if (attempt === 2 || !/WebGL|shader/i.test(String(err))) throw err;\n    await new Promise((r) => setTimeout(r, 200 * (attempt + 1)));\n  }\n}","preventionTips":["Reduce concurrent WebGL effects to free shader objects.","Render on a host with adequate GPU resources.","Use the Remotion-bundled Chrome with a healthy GL backend."],"tags":["webgl","glow","gpu","runtime","shader"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}