{"record":{"id":"0452bd936331b0b7","repo":"remotion-dev/remotion","slug":"program-link-failed-log-no-log-0452bd","errorCode":null,"errorMessage":"Program link failed: ${log ?? '(no log)'}","messagePattern":"Program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/fisheye/fisheye-runtime.ts","lineNumber":60,"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":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/fisheye/fisheye-runtime.ts#L42-L78","documentation":"Thrown by linkProgram() in fisheye-runtime.ts when gl.getProgramParameter(program, gl.LINK_STATUS) is false after gl.linkProgram() (fisheye-runtime.ts:57-61). Both fisheye shaders compiled, but the linker rejected the program — varying/uniform mismatch (uSource, uCenter, uFieldOfView, uRadius, uZoom, uAspect) or a driver linker bug. The InfoLog is included and the half-linked program is deleted.","triggerScenarios":"setupFisheye() links FISHEYE_VS + FISHEYE_FS and LINK_STATUS comes back false. Because the shader contract (vUv + six uniforms) is fixed, a link failure points at a driver/translator linker bug, a degraded context, or a local edit that desynchronized the vertex/fragment varying declarations in fisheye-shaders.ts.","commonSituations":"Software GL / SwiftShader translators with buggy linkers in headless CI; outdated GPU drivers; a context partly broken after a GPU reset; local edits to fisheye-shaders.ts that broke the varying/uniform contract between stages.","solutions":["Render with --gl=angle (CLI) / chromiumOptions.gl='angle' (SSR) / Angle (Studio) to use a stable linker.","Read the InfoLog in the error; if it names a varying/uniform mismatch, verify fisheye-shaders.ts was not locally edited and that the vertex output (vUv) and fragment input match.","Update GPU drivers or switch to a known-good software GL path.","Confirm the context is healthy (gl.isContextLost()) and restore before retrying.","Report the driver linker bug if the GLSL is valid and the InfoLog is nonsensical."],"exampleFix":"// before\ngl.linkProgram(program);\nif (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n  // linker rejected fisheye program\n}\n\n// after (force a stable linker)\n// CLI:  remotion render <comp> --gl=angle\n// SSR:  renderMediaOnLambda({ chromiumOptions: { gl: 'angle' } })","handlingStrategy":"try-catch","validationCode":"// No user input affects linking; FISHEYE_VS/FISHEYE_FS are fixed strings.\n// Pre-check only context health before setup.\nconst isContextHealthy = (gl: WebGL2RenderingContext): boolean =>\n  !gl.isContextLost();","typeGuard":null,"tryCatchPattern":"try {\n  // apply fisheye(); for a custom canvas: const state = setupFisheye(canvas);\n} catch (err) {\n  if (err instanceof Error && /Program link failed/.test(err.message)) {\n    // err.message has the InfoLog; render on Angle and retry.\n    console.error('fisheye link failure:', err.message);\n    throw err;\n  }\n  throw err;\n}","preventionTips":["Render with the Angle backend for a stable linker.","Do not locally desync the vertex/fragment varying contract in fisheye-shaders.ts.","Keep GPU drivers current; report driver linker bugs if the GLSL is valid.","Confirm context health (gl.isContextLost()) before setup."],"tags":["webgl","shader","glsl","linker","gpu","fisheye","setup"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}