{"record":{"id":"35f7585ef59f9e84","repo":"remotion-dev/remotion","slug":"flannel-program-link-failed-log-no-log","errorCode":null,"errorMessage":"Flannel program link failed: ${log ?? '(no log)'}","messagePattern":"Flannel program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/flannel.ts","lineNumber":234,"sourceCode":"\t}\n\n\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\tconst vertexShader = compileShader(gl, gl.VERTEX_SHADER, FLANNEL_VS);\n\tconst fragmentShader = compileShader(gl, gl.FRAGMENT_SHADER, FLANNEL_FS);\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, vertexShader);\n\tgl.attachShader(program, fragmentShader);\n\tgl.linkProgram(program);\n\tgl.deleteShader(vertexShader);\n\tgl.deleteShader(fragmentShader);\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(`Flannel program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\tconst vao = gl.createVertexArray();\n\tconst vbo = gl.createBuffer();\n\tif (!vao || !vbo) {\n\t\tthrow new Error('Failed to create WebGL geometry');\n\t}\n\n\tgl.bindVertexArray(vao);\n\tgl.bindBuffer(gl.ARRAY_BUFFER, vbo);\n\tgl.bufferData(\n\t\tgl.ARRAY_BUFFER,\n\t\tnew Float32Array([-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1]),\n\t\tgl.STATIC_DRAW,\n\t);\n\tconst aPos = gl.getAttribLocation(program, 'aPos');\n\tconst aUv = gl.getAttribLocation(program, 'aUv');\n\tgl.enableVertexAttribArray(aPos);","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/flannel.ts#L216-L252","documentation":"Thrown when gl.linkProgram fails for the flannel program, with the GPU's info log appended. Link failure means the compiled shaders are individually valid but incompatible (e.g. varying/in-out mismatch, missing uniforms), pointing at a bug in the shipped shader pair.","triggerScenarios":"Vertex and fragment shaders declare mismatched in/out varyings; a uniform referenced in one stage is declared incorrectly in the other; tampered shader source.","commonSituations":"Editing FLANNEL_VS or FLANNEL_FS and forgetting to mirror an in/out declaration; environment where a GLSL qualifier is rejected at link time.","solutions":["Inspect the appended info log for the mismatched symbol.","Restore the shipped shader sources from a clean checkout if modified.","File a Remotion bug with the log and GPU details if it reproduces on the released version."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  effect = flannel(params);\n} catch (err) {\n  if (/program link failed/i.test(String(err))) {\n    console.error('Flannel link failure; info log:', String(err));\n  }\n  throw err;\n}","preventionTips":["If you modify flannel shaders, keep vertex/fragment in/out declarations and uniforms matched.","Restore shaders from a clean checkout when link errors appear after edits.","Report persistent link failures with the info log and GPU details."],"tags":["webgl","flannel","shader","link","glsl"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}