{"record":{"id":"1e18cc75b527ecca","repo":"remotion-dev/remotion","slug":"color-key-program-link-failed-log-no-log","errorCode":null,"errorMessage":"Color key program link failed: ${log ?? '(no log)'}","messagePattern":"Color key program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/color-key.ts","lineNumber":222,"sourceCode":"};\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(`Color key 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,\n): WebGLProgram => {\n\tconst vs = compileShader(gl, gl.VERTEX_SHADER, vertexSource);\n\tconst fs = compileShader(gl, gl.FRAGMENT_SHADER, fragmentSource);\n\tconst program = linkProgram(gl, vs, fs);\n\tgl.deleteShader(vs);\n\tgl.deleteShader(fs);\n\treturn program;\n};\n","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/color-key.ts#L204-L240","documentation":"Thrown by linkProgram in the color key effect when gl.getProgramParameter(program, LINK_STATUS) is false. Both color key shaders compiled, but linking into a program failed; the driver's program info log is appended. For bundled shaders this is normally a driver/version incompatibility rather than a parameter issue.","triggerScenarios":"At color-key.ts:222 inside linkProgram after COLOR_KEY_VS and COLOR_KEY_FS were compiled and attached. Linking failed and the info log (or '(no log)') is included.","commonSituations":"A GL driver or Chromium version that compiles but fails to link the bundled shaders, software GL with non-standard behavior, or a degraded context.","solutions":["Inspect the info log for the exact link error (e.g. unresolved attribute/uniform).","Upgrade the GPU driver and Chromium/Chrome build used to render.","Switch from software GL to a GPU-enabled environment.","File a Remotion issue with driver, Chrome version, and the log; shaders are library-controlled."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await renderMedia({...});\n} catch (err) {\n  const msg = String(err);\n  if (/Color key program link failed/i.test(msg)) {\n    // link failure is driver/version-specific; report and switch environment\n    throw new Error(`Color-key program link failed. Log: ${msg}`);\n  }\n  throw err;\n}","preventionTips":["Pin a known-good Chromium version and keep GPU drivers updated.","Avoid software GL for renders that use color key.","Capture the linker log on failure and report it to Remotion with environment details.","Validate renders in the production render environment, not only locally."],"tags":["webgl","shader","glsl","color-key","driver-compatibility","linker","rendering"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}