{"record":{"id":"5a301b5ab430a983","repo":"remotion-dev/remotion","slug":"duotone-program-link-failed-log-no-log","errorCode":null,"errorMessage":"Duotone program link failed: ${log ?? '(no log)'}","messagePattern":"Duotone program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/duotone.ts","lineNumber":168,"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(`Duotone 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":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/duotone.ts#L150-L186","documentation":"Thrown by duotone's linkProgram() when gl.getProgramParameter(program, gl.LINK_STATUS) is false after both shaders compiled and the program was allocated. The program info log is embedded. With both shaders compiled from fixed library GLSL, a link failure means the driver could compile each stage but not bind them together, pointing at a driver/translation defect rather than user input.","triggerScenarios":"First-frame setup of duotone() on a driver that compiles DUOTONE_VS and DUOTONE_FS individually but fails to link them (e.g. varying/uniform incompatibility introduced by the driver's shader translator).","commonSituations":"Buggy or outdated GPU drivers, ANGLE/SwiftShader regressions, or a Chromium shader-translator change that breaks linking for this effect on a specific platform.","solutions":["Change the GL backend and re-render: `npx remotion render <comp> --gl=swiftshader` (or --gl=angle).","Update the GPU driver and Chromium build.","If it reproduces on multiple backends, report it as a Remotion bug with the program info log from the message."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"async function renderWithFallback(opts) {\n  try {\n    return await renderMedia(opts);\n  } catch (err) {\n    const msg = String(err?.message ?? '');\n    if (/program link failed/i.test(msg)) {\n      return await renderMedia({...opts, gl: 'swiftshader'});\n    }\n    throw err;\n  }\n}","preventionTips":["Use a GL backend known to translate this effect's shaders correctly (swiftshader first).","Keep GPU drivers and Chromium current.","Capture the program info log from the message when escalating to a Remotion bug report.","Reproduce across at least two backends before assuming a library defect."],"tags":["webgl","glsl","shader","gpu","effects","rendering"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}