remotion-dev/remotion · error · Error

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

Error message

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

What it means

Thrown by emboss's linkProgram() when gl.LINK_STATUS is false despite both shaders compiling and the program being allocated. The program info log is embedded. With fixed library GLSL, a link failure points to a driver/translation defect (e.g. the translator produced incompatible stage outputs) rather than user input.

Source

Thrown at packages/effects/src/emboss.ts:298

};

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

	return program;
};

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

	gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);

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

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Change the GL backend and re-render: `npx remotion render <comp> --gl=swiftshader` (or --gl=angle).
  2. Update the GPU driver and Chromium build.
  3. If it reproduces on multiple backends, report it as a Remotion bug with the program info log.
Defensive patterns

Strategy: fallback

Try / catch

async function renderWithFallback(opts) {
  try {
    return await renderMedia(opts);
  } catch (err) {
    const msg = String(err?.message ?? '');
    if (/program link failed/i.test(msg)) {
      return await renderMedia({...opts, gl: 'swiftshader'});
    }
    throw err;
  }
}

Prevention

When it happens

Trigger: First-frame setup of emboss() on a driver that compiles EMBOSS_VS and EMBOSS_FS but cannot link them.

Common situations: Buggy or outdated GPU drivers, ANGLE/SwiftShader regressions, or a Chromium shader-translator change that breaks linking on a specific platform.

Related errors


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