{"record":{"id":"6c4878acc418f973","repo":"remotion-dev/remotion","slug":"skew-program-link-failed-log-no-log","errorCode":null,"errorMessage":"Skew program link failed: ${log ?? '(no log)'}","messagePattern":"Skew program link failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/skew.ts","lineNumber":204,"sourceCode":"\t}\n\n\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\tconst vertexShader = compileShader(gl, gl.VERTEX_SHADER, SKEW_VS);\n\tconst fragmentShader = compileShader(gl, gl.FRAGMENT_SHADER, SKEW_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);\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(`Skew program link failed: ${log ?? '(no log)'}`);\n\t}\n\n\tconst vao = gl.createVertexArray();\n\tconst vbo = gl.createBuffer();\n\tif (!vao || !vbo) {\n\t\tthrow new Error('Failed to create WebGL geometry');\n\t}\n\n\tgl.bindVertexArray(vao);\n\tgl.bindBuffer(gl.ARRAY_BUFFER, vbo);\n\tgl.bufferData(\n\t\tgl.ARRAY_BUFFER,\n\t\tnew Float32Array([-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1]),\n\t\tgl.STATIC_DRAW,\n\t);\n\tconst aPos = gl.getAttribLocation(program, 'aPos');\n\tconst aUv = gl.getAttribLocation(program, 'aUv');\n\tgl.enableVertexAttribArray(aPos);","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/skew.ts#L186-L222","documentation":"The skew() effect created and attached its shaders but gl.linkProgram() failed: gl.getProgramParameter(program, gl.LINK_STATUS) returned false. The library deletes the program and throws with the driver's info log. Since the shaders already compiled individually, a link failure points to a driver bug or a non-conformant linker, not caller input.","triggerScenarios":"Linking SKEW_VS + SKEW_FS on a WebGL2 implementation whose linker rejects valid GLSL ES 3.00 (e.g. mismatches in varying interpolation, unsupported uniform optimization). The appended info log shows the linker's complaint.","commonSituations":"Software rasterizers or outdated drivers with incomplete linkers; virtualized GPU access; a WebGL2 context that reports support but fails on real programs; rare driver-specific bugs triggered by the shader's specific uniform/varying set.","solutions":["Switch to the ANGLE backend (--gl=angle / chromiumOptions.gl='angle' / Studio OpenGL=angle) for a conformant linker.","Inspect the info log in the error text to identify the link error, then update/replace the GPU driver accordingly.","Run on a host with verified WebGL2 conformance (real GPU or known-good ANGLE).","As a stopgap, remove skew() from the affected composition and use a CSS transform-based skew instead."],"exampleFix":"// before\nnpx remotion render main MyComp out.mp4\n// error: Skew program link failed: ...\n\n// after\nnpx remotion render main MyComp out.mp4 --gl=angle","handlingStrategy":"try-catch","validationCode":"// Shaders are internal; the useful pre-check is GLSL ES 3.00 link capability.\nfunction canLinkGlsl300Program(): boolean {\n  const c = document.createElement('canvas');\n  const gl = c.getContext('webgl2');\n  if (!gl) return false;\n  const mk = (type: number, src: string) => {\n    const s = gl.createShader(type)!;\n    gl.shaderSource(s, src); gl.compileShader(s); return s;\n  };\n  const vs = mk(gl.VERTEX_SHADER, '#version 300 es\\nin vec2 p;void main(){gl_Position=vec4(p,0.,1.);}');\n  const fs = mk(gl.FRAGMENT_SHADER, '#version 300 es\\nprecision highp float;out vec4 o;void main(){o=vec4(1.);}');\n  const prog = gl.createProgram();\n  if (!prog) return false;\n  gl.attachShader(prog, vs); gl.attachShader(prog, fs); gl.linkProgram(prog);\n  return gl.getProgramParameter(prog, gl.LINK_STATUS) === true;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await renderMedia({ composition, codec: 'h264', chromiumOptions: { gl: 'angle' } });\n} catch (err) {\n  if (err instanceof Error && /Skew program link failed/.test(err.message)) {\n    console.error('skew() program link failed — non-conformant WebGL2 linker:', err.message);\n    throw err;\n  }\n  throw err;\n}","preventionTips":["Use the ANGLE backend for a conformant linker.","Keep GPU drivers updated.","Verify WebGL2 program linking works on the render host before relying on effects.","Report the driver info log from the error when filing issues."],"tags":["webgl","gpu","glsl","shader","linker","effects","skew","driver"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}