remotion-dev/remotion · critical · Error

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

Error message

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

What it means

Thrown by linkProgram (packages/effects/src/paper.ts:687) when the paper program's LINK_STATUS is false; the info log is appended. PAPER_VS and PAPER_FS compiled but linking failed — for these hardcoded correct shaders that points to a driver link bug, an attribute/uniform binding inconsistency in the driver, or context corruption.

Source

Thrown at packages/effects/src/paper.ts:687

};

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

	return program;
};

const createSourceTexture = (gl: WebGL2RenderingContext): WebGLTexture => {
	const texture = gl.createTexture();
	if (!texture) {
		throw new Error('Failed to create WebGL texture');
	}

	gl.bindTexture(gl.TEXTURE_2D, texture);
	gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
	gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
	gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
	gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
	gl.bindTexture(gl.TEXTURE_2D, null);
	return texture;

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Update the GPU driver / browser on the render host.
  2. Render on real GPU hardware or GPU-enabled headless Chrome.
  3. Read the appended info log, report it, and disable paper() for that environment.

Example fix

// before
paper({amount: 1}); // program link fails on this driver

// after: feature-probe linking once per host, fall back if it fails
const ok = await probePaperProgramLinks();
const effects = ok ? [paper({amount: 1})] : [];
Defensive patterns

Strategy: fallback

Try / catch

try {
  scene.push(paper({amount: 1}));
} catch (err) {
  if (/Paper program link failed/.test(String(err?.message))) {
    // driver linker bug: disable paper for this host, log info log
  } else throw err;
}

Prevention

When it happens

Trigger: Linking the paper program on a driver that compiles GLSL ES 3.00 but links incorrectly; linking after a context loss/restoration that left state inconsistent; exceeding a driver-specific uniform/attribute limit at link time.

Common situations: Buggy or outdated GPU drivers; software rasterizers with incomplete linkers; VM/remote display adapters.

Related errors


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