remotion-dev/remotion · error · Error
Pattern program link failed: ${log ?? '(no log)'}
Error message
Pattern program link failed: ${log ?? '(no log)'} What it means
After pattern()'s vertex and fragment shaders are attached and gl.linkProgram runs, the driver reports LINK_STATUS=false. With fixed, separately-compiled shaders this means the program failed to link on this driver (e.g. mismatched varyings/precision the driver rejects) or the context is failing operations. The program info log is interpolated for diagnostics.
Source
Thrown at packages/effects/src/pattern.ts:432
};
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(`Pattern program link failed: ${log ?? '(no log)'}`);
}
return program;
};
export const pattern = createEffect<PatternParams, PatternState>({
type: 'dev.remotion.effects.pattern',
label: 'pattern()',
documentationLink: 'https://www.remotion.dev/docs/effects/pattern',
backend: 'webgl2',
calculateKey: (params) => {
const r = resolve(params);
return `pattern-${r.scale}-${r.cropLeft}-${r.cropTop}-${r.cropRight}-${r.cropBottom}-${r.gapX}-${r.gapY}-${r.offsetU}-${r.offsetV}-${r.rowOffset}-${r.rowOffsetEvery}-${r.columnOffset}-${r.columnOffsetEvery}-${r.origin[0]}-${r.origin[1]}-${r.wrap ? 1 : 0}`;
},
setup: (target) => {
const gl = target.getContext('webgl2', {
premultipliedAlpha: true,
alpha: true,View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Render on a current Chromium build with a capable GPU (or SwiftShader in CI).
- Update GPU drivers.
- Handle context loss and retry initialization on restore.
- Capture and report the interpolated info log if it reproduces on supported hardware.
Defensive patterns
Strategy: try-catch
Validate before calling
// Probe program linking capability on this GPU once at startup.
function canLinkPatternProgram(gl: WebGL2RenderingContext): boolean {
const vs = buildShader(gl, gl.VERTEX_SHADER, PATTERN_VS);
const fs = buildShader(gl, gl.FRAGMENT_SHADER, PATTERN_FS);
if (!vs || !fs) return false;
const p = gl.createProgram();
gl.attachShader(p, vs); gl.attachShader(p, fs); gl.linkProgram(p);
const ok = gl.getProgramParameter(p, gl.LINK_STATUS);
gl.deleteProgram(p);
return Boolean(ok);
} Try / catch
try {
initPattern(canvas);
} catch (err) {
if (String(err.message).startsWith('Pattern program link failed')) {
logLinkIssue(err.message);
useNonGpuFallback();
} else throw err;
} Prevention
- Render on a current Chromium build with a capable GPU (or SwiftShader in CI).
- Update GPU drivers on render machines.
- Handle context loss and retry setup on restore.
- Report the interpolated info log if it reproduces on supported hardware.
When it happens
Trigger: linkProgram() calls gl.getProgramParameter(program, LINK_STATUS) which returns false; gl.getProgramInfoLog yields the driver's link error. Occurs during pattern effect setup.
Common situations: Driver quirk rejecting the shader pair; lost context causing link to fail; outdated mobile/virtual GPU drivers; GPU blacklists in the browser degrading WebGL2.
Related errors
- Pixel Dissolve program link failed: ${log ?? '(no log)'}
- Noise program link failed: ${log ?? '(no log)'}
- Paper program link failed: ${log ?? '(no log)'}
- Pattern shader compile failed: ${log ?? '(no log)'}
- Failed to create WebGL program
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/92386f4b2a5a6f0a.
Report an issue: GitHub.