{"record":{"id":"7ad7e129b356a117","repo":"remotion-dev/remotion","slug":"lines-shader-compile-failed-log-no-log","errorCode":null,"errorMessage":"Lines shader compile failed: ${log ?? '(no log)'}","messagePattern":"Lines shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/lines.ts","lineNumber":315,"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(`Lines shader compile failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn shader;\n};\n\nconst linkProgram = (\n\tgl: WebGL2RenderingContext,\n\tvs: WebGLShader,\n\tfs: WebGLShader,\n): WebGLProgram => {\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, vs);\n\tgl.attachShader(program, fs);\n\tgl.linkProgram(program);","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/lines.ts#L297-L333","documentation":"A plain Error thrown by compileShader in the Lines effect when gl.getShaderParameter(shader, gl.COMPILE_STATUS) is false. The shader is deleted and the info log is appended, so the message contains the GLSL compiler output. The shaders (LINES_VS / LINES_FS) are static library strings, so a compile failure almost always points to a GPU/driver incompatibility rather than user input.","triggerScenarios":"The device's GLSL ES 3.00 compiler rejects a construct in the bundled Lines shaders — e.g. a driver bug around precision, texture(), or integer uniforms. Cannot be triggered by lines() params because the shader source does not interpolate user strings.","commonSituations":"Outdated mobile GPU drivers, buggy software GL implementations, or a browser/OS combo with known WebGL2 shader-compiler regressions. Read the captured info log in the error message to confirm the driver-specific cause.","solutions":["Read the info log embedded in the error message to identify the rejected GLSL line/feature.","Update the GPU driver / browser / Chromium build used by Remotion to render.","If on a known-bad GPU, try a different GL backend (e.g. --use-angle=gl or swiftshader).","Report the driver + info log to the Remotion maintainers since the shader source is fixed library code."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  lines(...);\n} catch (err) {\n  if (err instanceof Error && /shader compile failed/.test(err.message)) {\n    // log err.message (contains the GLSL info log) and switch backend/driver\n  } else throw err;\n}","preventionTips":["Keep GPU drivers and the Chromium build current.","Capture and log the info log from the error message to identify driver-specific failures.","Test the Lines effect on the target device class before relying on it in production."],"tags":["webgl2","lines-effect","glsl","shader-compile","driver"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}