{"record":{"id":"4214bde181fb5a35","repo":"remotion-dev/remotion","slug":"light-trail-program-link-failed-log-no-log","errorCode":null,"errorMessage":"Light trail program link failed: ${log ?? '(no log)'}","messagePattern":"Light trail program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/light-trail/light-trail-runtime.ts","lineNumber":66,"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(`Light trail 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":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/light-trail/light-trail-runtime.ts#L48-L84","documentation":"Thrown when `gl.linkProgram` reports LINK_STATUS false for lightTrail. The driver info log is appended. Both shaders compiled; link failures typically mean a vertex/fragment interface mismatch — but since both shaders ship together and are tested, real-world triggers are driver bugs or context corruption.","triggerScenarios":"A non-conformant driver rejecting a valid program; context loss corrupting program state mid-link; symbol/precision mismatch introduced only by a specific driver's stricter linker.","commonSituations":"Older mobile/SwiftShader; virtualized GPU; rare regressions after a Chromium update; reproducible only on specific render workers.","solutions":["Inspect the `${log}` field — it pinpoints the linker complaint.","Reproduce on the affected driver to confirm it is environmental, then update drivers or swap the Chromium build.","Dispose and re-setup on `webglcontextrestored` if context loss is suspected.","File a @remotion/effects issue with the log and driver string if it reproduces on a current Chrome."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  setupLightTrail(canvas);\n} catch (err) {\n  const log = String(err?.message ?? '');\n  reportShaderIssue(log);\n  renderWithoutEffect();\n}","preventionTips":["Reproduce link failures on the target driver before assuming code fault.","Pin a tested Chromium build on workers.","Capture the linker log when surfacing the error."],"tags":["webgl","light-trail","effects","gpu","shader"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}