remotion-dev/remotion · error · Error
Failed to create vibrance shader program
Error message
Failed to create vibrance shader program
What it means
Thrown by the vibrance effect's createProgram when gl.createProgram() returns null after both vertex and fragment shaders compiled successfully. This indicates the GL context was lost between compilation and program creation, or the driver exhausted its program object pool.
Source
Thrown at packages/effects/src/vibrance.ts:123
}
gl.shaderSource(shader, source);
gl.compileShader(shader);
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
const log = gl.getShaderInfoLog(shader);
gl.deleteShader(shader);
throw new Error(`Vibrance shader compile failed: ${log ?? '(no log)'}`);
}
return shader;
};
const createProgram = (gl: WebGL2RenderingContext): WebGLProgram => {
const vertexShader = compileShader(gl, gl.VERTEX_SHADER, VERTEX_SHADER);
const fragmentShader = compileShader(gl, gl.FRAGMENT_SHADER, FRAGMENT_SHADER);
const program = gl.createProgram();
if (!program) {
throw new Error('Failed to create vibrance shader program');
}
gl.attachShader(program, vertexShader);
gl.attachShader(program, fragmentShader);
gl.linkProgram(program);
gl.deleteShader(vertexShader);
gl.deleteShader(fragmentShader);
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
const log = gl.getProgramInfoLog(program);
gl.deleteProgram(program);
throw new Error(`Vibrance shader link failed: ${log ?? '(no log)'}`);
}
return program;
};
const createTexture = (gl: WebGL2RenderingContext): WebGLTexture => {View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Reduce render concurrency to keep GL object counts within driver limits
- Handle webglcontextlost and re-run the render after context restoration
- Update GPU drivers
- If persistent, test on different GPU hardware to isolate driver bugs
Defensive patterns
Strategy: try-catch
Try / catch
try {
const state = setupVibrance(canvas);
} catch (err) {
if (err instanceof Error && err.message === 'Failed to create vibrance shader program') {
throw new Error('WebGL2 context lost during vibrance program creation. Retry render.');
}
throw err;
} Prevention
- Register webglcontextlost listeners to detect context degradation early
- Reduce render concurrency to keep GL program-object counts within driver limits
- Restart browser instances periodically in long-running render workers
When it happens
Trigger: Both shaders compiled via compileShader without error, but gl.createProgram() returns null in the subsequent line. Occurs when the context transitions to a lost state or the driver refuses another program object.
Common situations: Context loss mid-setup during concurrent rendering; driver resource limits exceeded with many effects in a composition; GPU instability during long renders.
Related errors
- Failed to create vibrance shader
- Failed to create shader
- Failed to create program
- Failed to create WebGL resources
- Failed to create WebGL shader
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/63e87a0cb34817d3.
Report an issue: GitHub.