remotion-dev/remotion · critical · Error
Light trail program link failed: ${log ?? '(no log)'}
Error message
Light trail program link failed: ${log ?? '(no log)'} What it means
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.
Source
Thrown at packages/effects/src/light-trail/light-trail-runtime.ts:66
};
const linkProgram = (
gl: WebGL2RenderingContext,
vs: WebGLShader,
fs: WebGLShader,
): WebGLProgram => {
const program = gl.createProgram();
if (!program) {
throw new Error('Failed to create WebGL program');
}
gl.attachShader(program, vs);
gl.attachShader(program, fs);
gl.linkProgram(program);
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const log = gl.getProgramInfoLog(program);
gl.deleteProgram(program);
throw new Error(`Light trail program link failed: ${log ?? '(no log)'}`);
}
return program;
};
const createProgram = (
gl: WebGL2RenderingContext,
vertexSource: string,
fragmentSource: string,
): WebGLProgram => {
const vs = compileShader(gl, gl.VERTEX_SHADER, vertexSource);
const fs = compileShader(gl, gl.FRAGMENT_SHADER, fragmentSource);
const program = linkProgram(gl, vs, fs);
gl.deleteShader(vs);
gl.deleteShader(fs);
return program;
};
View on GitHub (pinned to 78fe4bb3fd)
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.
Defensive patterns
Strategy: try-catch
Try / catch
try {
setupLightTrail(canvas);
} catch (err) {
const log = String(err?.message ?? '');
reportShaderIssue(log);
renderWithoutEffect();
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Older mobile/SwiftShader; virtualized GPU; rare regressions after a Chromium update; reproducible only on specific render workers.
Related errors
- Light trail shader compile failed: ${log ?? '(no log)'}
- Failed to create WebGL shader
- Checkerboard shader compile failed: ${log ?? '(no log)'}
- Failed to create WebGL shader
- Shader compile failed: ${log ?? '(no log)'}
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/4214bde181fb5a35.
Report an issue: GitHub.