{"record":{"id":"97de768ccf5b0310","repo":"remotion-dev/remotion","slug":"outline-shader-compile-failed-log-no-log","errorCode":null,"errorMessage":"Outline shader compile failed: ${log ?? '(no log)'}","messagePattern":"Outline shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/outline.ts","lineNumber":237,"sourceCode":"}\n`;\n\nconst compileShader = (\n\tgl: WebGL2RenderingContext,\n\ttype: number,\n\tsource: string,\n): WebGLShader => {\n\tconst shader = gl.createShader(type);\n\tif (!shader) {\n\t\tthrow new Error('Failed to create WebGL shader');\n\t}\n\n\tgl.shaderSource(shader, source);\n\tgl.compileShader(shader);\n\tif (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n\t\tconst log = gl.getShaderInfoLog(shader);\n\t\tgl.deleteShader(shader);\n\t\tthrow new Error(`Outline shader compile failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn shader;\n};\n\nconst createProgram = (gl: WebGL2RenderingContext): WebGLProgram => {\n\tconst vertexShader = compileShader(gl, gl.VERTEX_SHADER, OUTLINE_VS);\n\tconst fragmentShader = compileShader(gl, gl.FRAGMENT_SHADER, OUTLINE_FS);\n\tconst program = gl.createProgram();\n\tif (!program) {\n\t\tthrow new Error('Failed to create WebGL program');\n\t}\n\n\tgl.attachShader(program, vertexShader);\n\tgl.attachShader(program, fragmentShader);\n\tgl.linkProgram(program);\n\tgl.deleteShader(vertexShader);\n\tgl.deleteShader(fragmentShader);","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/remotion-dev/remotion/blob/10db9de07356446fb0edb3c3ae211369b693d18b/packages/effects/src/outline.ts#L219-L255","documentation":"While setting up the outline() effect, gl.compileShader() reported failure and the driver info log is included in the message. The vertex/fragment shaders (OUTLINE_VS/OUTLINE_FS) are fixed strings shipped inside @remotion/effects - the user supplies no GLSL - so a compile failure almost always indicates a broken/lost WebGL2 context or a driver bug, not a bad effect parameter.","triggerScenarios":"Applying outline() on a WebGL2 context whose shader compiler is unavailable or broken (context lost mid-setup, driver shader-compiler crash, SwiftShader bug in headless Chrome). The log text after 'Outline shader compile failed:' is the driver's own reason.","commonSituations":"Headless/server Chrome with faulty GPU or SwiftShader shader compilation; GPU blocklisted in the running Chrome build; long renders where the context degrades. Rare on healthy desktop Chrome.","solutions":["Re-run the render / restart Chrome - transient compiler failures usually disappear on a fresh context","Update to the latest Chrome/Chromium (Remotion bundles its own; also update @remotion/renderer) and GPU drivers","Read the driver log in the message - 'context lost' confirms error 62's family; 'too many shaders' style logs point to context exhaustion (lower --concurrency)","If deterministic, report to the Remotion repo with the full log text and Chrome version"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Capture the driver log and fall back to rendering without the effect\ntry {\n  await renderMedia({composition, codec: 'h264'});\n} catch (err) {\n  if (\n    err instanceof Error &&\n    err.message.startsWith('Outline shader compile failed:')\n  ) {\n    console.error('Shader compiler issue:', err.message);\n    // retry with a CSS-based outline (box-shadow) composition instead\n    await renderMedia({composition: fallbackComposition, codec: 'h264'});\n  } else {\n    throw err;\n  }\n}","preventionTips":["Pin a known-good Chrome/Chromium version for render hosts that use outline()","Watch for driver log text - it distinguishes driver bugs from context loss","Keep @remotion/effects updated; shader fixes ship in patches"],"tags":["remotion","effects","webgl","shader-compile","outline","gpu"],"backgroundTag":"shader-compile-failed","analyzedSha":"10db9de07356446fb0edb3c3ae211369b693d18b","analyzedAt":"2026-08-22T21:45:17.748Z","contentChangedAt":"2026-08-22T21:45:17.748Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}