{"record":{"id":"18efb741cc13f6be","repo":"remotion-dev/remotion","slug":"program-link-failed-log-no-log-18efb7","errorCode":null,"errorMessage":"Program link failed: ${log ?? '(no log)'}","messagePattern":"Program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/mirror/mirror-runtime.ts","lineNumber":59,"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(`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":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/mirror/mirror-runtime.ts#L41-L77","documentation":"The mirror effect's vertex and fragment shaders compiled successfully but failed to link into a complete WebGL program. gl.getProgramParameter(program, gl.LINK_STATUS) returned false, and the linker log is included. This indicates a mismatch between vertex shader outputs and fragment shader inputs, or a library-level shader defect — the shader sources are static and library-controlled.","triggerScenarios":"During setupMirror, linkProgram attaches both compiled shaders, calls gl.linkProgram, and gl.getProgramParameter(program, gl.LINK_STATUS) returns false. The program info log from gl.getProgramInfoLog is surfaced in the message.","commonSituations":"GPU driver bugs in the program linker; varying/in-out declarations that mismatch on certain drivers; exceeding driver-specific uniform or attribute limits. Rarely caused by user input since the shaders are fixed within the library.","solutions":["Report the linker log and GPU/driver details to the Remotion team — the shader pair is library-controlled.","Update GPU drivers.","Test on a different GPU or SwiftShader software renderer to isolate driver-specific linker bugs.","On CI, ensure the headless browser has adequate WebGL2 program-linking support."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Program link failures are driver/library bugs — catch and report\ntry {\n  // render with mirror effect\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Program link failed')) {\n    console.error('Mirror program link failed:', e.message);\n    // Fallback: render without the effect\n  } else {\n    throw e;\n  }\n}","preventionTips":["Report program linker logs and GPU details to the Remotion team.","Update GPU drivers to avoid linker bugs.","Test on SwiftShader or alternative GPUs to isolate driver-specific issues."],"tags":["webgl","gpu","glsl","shader","mirror-effect","driver-compat"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}