{"record":{"id":"523ab45e3a9b97e6","repo":"remotion-dev/remotion","slug":"metallic-swirl-program-link-failed-log-no","errorCode":null,"errorMessage":"Metallic swirl program link failed: ${log ?? '(no log)'}","messagePattern":"Metallic swirl program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/brand/src/effects/metallic-swirl-effect.ts","lineNumber":494,"sourceCode":"};\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);\n\tif (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n\t\tconst log = gl.getProgramInfoLog(program);\n\t\tgl.deleteProgram(program);\n\t\tthrow new Error(`Metallic swirl program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\nexport const metallicSwirl = createEffect<\n\tMetallicSwirlParams,\n\tMetallicSwirlState\n>({\n\ttype: 'dev.remotion.brand.metallic-swirl',\n\tlabel: 'metallicSwirl()',\n\tdocumentationLink: null,\n\tbackend: 'webgl2',\n\tcalculateKey: (params) => {\n\t\tconst r = resolve(params);\n\t\treturn [\n\t\t\t'metallic-swirl',\n\t\t\tr.time,","sourceCodeStart":476,"sourceCodeEnd":512,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/brand/src/effects/metallic-swirl-effect.ts#L476-L512","documentation":"In `linkProgram`, both shaders compiled but `gl.getProgramParameter(program, gl.LINK_STATUS)` is false. The message includes the program info log. With the shipped vertex/fragment pair this should not occur; a link failure means the shader stages are incompatible (different GLSL versions, mismatched varyings, or a driver linker bug).","triggerScenarios":"A modified or corrupted shader source where vertex and fragment varyings/uniforms no longer match; a driver linker bug on specific GPUs; mixing GLSL ES versions between the two stages after a fork.","commonSituations":"Forking the effect shaders without keeping vertex/fragment varying declarations in sync; buggy linkers on older mobile GPUs; transpiler/build steps that alter one shader string but not the other.","solutions":["Read the program info log in the message to find the linker error.","If you forked the shaders, ensure vertex output varyings match fragment inputs and both use GLSL ES 3.00 (`#version 300 es`).","Update GPU drivers / try a different hardware-accelerated browser.","Report unmodified-source link failures with the GPU/driver info to maintainers."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  metallicSwirl({speed: 1})(...);\n} catch (err) {\n  if (err instanceof Error && /Metallic swirl program link failed/.test(err.message)) {\n    // log the info log, fall back to a non-shader effect\n    console.error(err.message);\n  } else {\n    throw err;\n  }\n}","preventionTips":["Keep vertex and fragment shaders in sync if you fork them (matching varyings, same GLSL ES version).","Use a hardware-accelerated browser with current GPU drivers.","Report unmodified-source link failures (with the info log + GPU/driver) to maintainers.","Keep a non-WebGL fallback effect for environments with flaky linkers."],"tags":["brand","metallic-swirl","webgl","shader","gpu"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}