remotion-dev/remotion · critical · Error

Burlap program link failed: ${log ?? '(no log)'}

Error message

Burlap program link failed: ${log ?? '(no log)'}

What it means

Thrown by burlap's `linkProgram` when both shaders compiled but `gl.linkProgram` produced a falsy LINK_STATUS; the info log is embedded. BURLAP_VS and BURLAP_FS use a named-attribute interface (`aPos`, `aUv`) read back via `getAttribLocation`, so a link failure typically traces to a vertex/fragment in-out mismatch, an inactive attribute, or a driver limitation.

Source

Thrown at packages/effects/src/burlap.ts:269

};

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(`Burlap program link failed: ${log ?? '(no log)'}`);
	}

	return program;
};

const setupBurlap = (target: HTMLCanvasElement): BurlapState => {
	const gl = target.getContext('webgl2', {
		premultipliedAlpha: true,
		alpha: true,
		preserveDrawingBuffer: true,
	});
	if (!gl) {
		throw createWebGL2ContextError('burlap effect');
	}

	gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);

	const vs = compileShader(gl, gl.VERTEX_SHADER, BURLAP_VS);

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Read the embedded info log for the precise linker diagnostic.
  2. Update @remotion/effects — link regressions are fixed upstream.
  3. Reproduce on another GPU/browser to detect driver-specific linking bugs.
  4. For headless rendering, confirm hardware-backed WebGL2 and report GL_RENDERER.

Example fix

// Library shader issue; capture the info log and report upstream.
console.error(gl.getParameter(gl.RENDERER));
Defensive patterns

Strategy: fallback

Validate before calling

// Probe linking with a minimal program before setup.
const p = gl.createProgram();
if (!p) { /* skip */ }
// attach minimal compiled vs/fs, link, check LINK_STATUS, then delete

Try / catch

try {
  burlap.setup(canvas);
} catch (err) {
  if (/Burlap program link failed/.test(err.message)) {
    // fall back to a non-WebGL effect; report info log upstream
  } else { throw err; }
}

Prevention

When it happens

Trigger: Fires at line 269 when `gl.getProgramParameter(program, gl.LINK_STATUS)` is falsy after `gl.linkProgram` in `setupBurlap`.

Common situations: Shipped shader revision with an interface mismatch (in/out names, varyings); driver rejecting uniform/attribute layout; software rasterizer with stricter linking; corrupted shader constants.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/91ea1f6335593494. Report an issue: GitHub.