{"record":{"id":"52c39ae6a5a2a18e","repo":"remotion-dev/remotion","slug":"shader-compile-failed-log-no-log-52c39a","errorCode":null,"errorMessage":"Shader compile failed: ${log ?? '(no log)'}","messagePattern":"Shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/blur/blur-runtime.ts","lineNumber":46,"sourceCode":"\t};\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(`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":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/blur/blur-runtime.ts#L28-L64","documentation":"Thrown by the blur effect's `compileShader` when the shader source compiled with a falsy COMPILE_STATUS. The message embeds the driver's info log. Because the GLSL lives in `blur-shaders.ts` (library constants), a compile failure means a shader regression or a GLSL ES 3.00 feature the driver does not accept.","triggerScenarios":"Fires at line 46 after `gl.compileShader` when `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` is falsy. Affects BLUR_VS, BLUR_FS_HORIZONTAL, or BLUR_FS_VERTICAL.","commonSituations":"A new blur shader revision ships with a syntax/type error; a driver rejects a construct (e.g. certain loop bounds, precision qualifiers) on older hardware; headless software rasterizer in CI with weaker GLSL support; truncated shader string from a broken build.","solutions":["Read the info log embedded in the error message — it points to the exact line/column of the GLSL error.","Update @remotion/effects to the latest version; shader bugs are patched upstream.","Reproduce on a discrete GPU and a different browser to isolate driver-specific rejection.","In headless CI, verify the GL_RENDERER string and that WebGL2 is hardware-backed."],"exampleFix":"// Not fixable by callers — BLUR_VS / BLUR_FS_* are library constants.\n// Capture the info log from the thrown error and report it upstream with:\nconsole.error(gl.getParameter(gl.RENDERER), gl.getParameter(gl.SHADING_LANGUAGE_VERSION));","handlingStrategy":"fallback","validationCode":"// Probe compile capability with a trivial shader before setup.\nconst probe = gl.createShader(gl.FRAGMENT_SHADER);\nif (!probe) { /* skip */ }\ngl.shaderSource(probe, 'void main(){}');\ngl.compileShader(probe);\nconst ok = gl.getShaderParameter(probe, gl.COMPILE_STATUS);\ngl.deleteShader(probe);\nif (!ok) { /* fall back */ }","typeGuard":null,"tryCatchPattern":"try {\n  const state = setupBlur(canvas);\n} catch (err) {\n  if (/Shader compile failed/.test(err.message)) {\n    // log err (contains info log), fall back to a non-WebGL effect\n  } else { throw err; }\n}","preventionTips":["Pin @remotion/effects to a tested version.","Log GL_RENDERER and SHADING_LANGUAGE_VERSION alongside errors.","Keep a CPU/2D fallback for shader-incompatible environments."],"tags":["webgl2","shader","glsl","blur","driver","compile"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}