{"record":{"id":"1f4e001b3798ab88","repo":"remotion-dev/remotion","slug":"speckle-program-link-failed-log-no-log","errorCode":null,"errorMessage":"Speckle program link failed: ${log ?? '(no log)'}","messagePattern":"Speckle program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/speckle.ts","lineNumber":196,"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(`Speckle program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\nexport const speckle = createEffect<SpeckleParams, SpeckleState>({\n\ttype: 'dev.remotion.effects.speckle',\n\tlabel: 'speckle()',\n\tdocumentationLink: 'https://www.remotion.dev/docs/effects/speckle',\n\tbackend: 'webgl2',\n\tcalculateKey: (params) => {\n\t\tconst r = resolve(params);\n\t\treturn `speckle-${r.density}-${r.size}-${r.randomness}`;\n\t},\n\tsetup: (target) => {\n\t\tconst gl = target.getContext('webgl2', {\n\t\t\tpremultipliedAlpha: true,\n\t\t\talpha: true,","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/speckle.ts#L178-L214","documentation":"The speckle() effect attached its compiled vertex and fragment shaders but gl.linkProgram() failed (LINK_STATUS false). linkProgram() deletes the program and throws with the driver's info log. Because both shaders compiled, a link failure here signals a driver/linker non-conformance — speckle's fragment shader uses several uniforms and varyings whose matching the linker may reject on buggy implementations.","triggerScenarios":"Linking SPECKLE_VS + SPECKLE_FS on a WebGL2 implementation whose linker rejects the valid GLSL ES 3.00 (e.g. varying mismatch, unsupported uniform optimization). The appended info log states the linker's complaint.","commonSituations":"Software rasterizers or old drivers with incomplete linkers; virtualized GPU access that reports WebGL2 but fails on real programs; rare driver-specific bugs triggered by the speckle shader's specific uniform/varying layout.","solutions":["Switch to ANGLE (--gl=angle / chromiumOptions.gl='angle' / Studio OpenGL=angle) for a conformant linker.","Inspect the info log in the error text, then update/replace the GPU driver accordingly.","Run on a host with verified WebGL2 conformance.","As a stopgap, remove speckle() from the affected composition."],"exampleFix":"// before\nnpx remotion render main MyComp out.mp4\n// error: Speckle program link failed: ...\n\n// after\nnpx remotion render main MyComp out.mp4 --gl=angle","handlingStrategy":"try-catch","validationCode":"function canLinkGlsl300Program(): boolean {\n  const c = document.createElement('canvas');\n  const gl = c.getContext('webgl2');\n  if (!gl) return false;\n  const mk = (type: number, src: string) => { const s = gl.createShader(type)!; gl.shaderSource(s, src); gl.compileShader(s); return s; };\n  const vs = mk(gl.VERTEX_SHADER, '#version 300 es\\nin vec2 p;void main(){gl_Position=vec4(p,0.,1.);}');\n  const fs = mk(gl.FRAGMENT_SHADER, '#version 300 es\\nprecision highp float;out vec4 o;void main(){o=vec4(1.);}');\n  const prog = gl.createProgram();\n  if (!prog) return false;\n  gl.attachShader(prog, vs); gl.attachShader(prog, fs); gl.linkProgram(prog);\n  return gl.getProgramParameter(prog, gl.LINK_STATUS) === true;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await renderMedia({ composition, codec: 'h264', chromiumOptions: { gl: 'angle' } });\n} catch (err) {\n  if (err instanceof Error && /Speckle program link failed/.test(err.message)) {\n    console.error('speckle() program link failed — non-conformant WebGL2 linker:', err.message);\n    throw err;\n  }\n  throw err;\n}","preventionTips":["Use the ANGLE backend for a conformant linker.","Keep GPU drivers updated.","Verify program linking on render hosts before relying on effects.","Include the driver info log when reporting issues."],"tags":["webgl","gpu","glsl","shader","linker","effects","speckle","driver"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}