{"record":{"id":"4b3495438b6448e0","repo":"remotion-dev/remotion","slug":"failed-to-create-webgl-program-4b3495","errorCode":null,"errorMessage":"Failed to create WebGL program","messagePattern":"Failed to create WebGL program","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/chromatic-aberration/chromatic-aberration-runtime.ts","lineNumber":49,"sourceCode":"\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(`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 => {\n\tconst program = gl.createProgram();\n\tif (!program) {\n\t\tthrow new Error('Failed to create WebGL program');\n\t}\n\n\tgl.attachShader(program, vs);\n\tgl.attachShader(program, fs);\n\tgl.linkProgram(program);\n\tif (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n\t\tconst log = gl.getProgramInfoLog(program);\n\t\tgl.deleteProgram(program);\n\t\tthrow new Error(`Program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\nconst createProgram = (\n\tgl: WebGL2RenderingContext,\n\tvertexSource: string,\n\tfragmentSource: string,","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/chromatic-aberration/chromatic-aberration-runtime.ts#L31-L67","documentation":"Thrown by linkProgram() in the chromatic aberration runtime when gl.createProgram() returns null. A null program means the WebGL2 context is lost/destroyed or out of program objects, so the chromatic aberration shaders cannot be linked and setup aborts.","triggerScenarios":"createProgram() -> linkProgram() calls gl.createProgram() at chromatic-aberration-runtime.ts:47 during setupChromaticAberration(); it returns null and the guard at :48 throws.","commonSituations":"Lost/destroyed GL context, GPU process crash, many concurrent programs across live compositions, or software rendering under load.","solutions":["Reduce concurrent chromatic-aberration / WebGL effects.","Enable GPU acceleration; remove --disable-gpu.","Recreate the effect after 'webglcontextrestored'.","Update GPU drivers; confirm WebGL2 program support.","Use a higher-memory/GPU render instance server-side."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"function probeWebGL2(): boolean {\n  try {\n    const c = document.createElement('canvas');\n    const gl = c.getContext('webgl2');\n    return !!gl && !gl.isContextLost();\n  } catch {\n    return false;\n  }\n}\nif (!probeWebGL2()) skipOrFallback();","typeGuard":null,"tryCatchPattern":"try {\n  return <ChromaticAberration {...props} />;\n} catch (err) {\n  if (/Failed to create WebGL program/.test(String(err))) return <FallbackFrame />;\n  throw err;\n}","preventionTips":["Reduce concurrent chromatic-aberration / WebGL effects to stay within program budgets.","Enable GPU acceleration; remove --disable-gpu.","Handle context loss/restore and recreate the effect.","Use a GPU/higher-memory render instance server-side."],"tags":["webgl","glsl","program","gpu","effects","chromatic-aberration","rendering"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}