{"record":{"id":"f18ef98f259c1d97","repo":"tinyhumansai/openhuman","slug":"meshgradient-failed-to-obtain-webgl-context","errorCode":null,"errorMessage":"[MeshGradient] Failed to obtain WebGL context","messagePattern":"\\[MeshGradient\\] Failed to obtain WebGL context","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/lib/meshGradient.js","lineNumber":30,"sourceCode":"  return [((hexCode >> 16) & 255) / 255, ((hexCode >> 8) & 255) / 255, (255 & hexCode) / 255];\n}\n['SCREEN', 'LINEAR_LIGHT'].reduce((hexCode, t, n) => Object.assign(hexCode, { [t]: n }), {});\n\n//Essential functionality of WebGl\n//t = width\n//n = height\nclass MiniGl {\n  constructor(canvas, width, height, debug = false) {\n    const _miniGl = this,\n      debug_output = -1 !== document.location.search.toLowerCase().indexOf('debug=webgl');\n    ((_miniGl.canvas = canvas),\n      (_miniGl.gl =\n        _miniGl.canvas.getContext('webgl', { antialias: true }) ||\n        _miniGl.canvas.getContext('webgl2', { antialias: true })),\n      (_miniGl.meshes = []));\n    const context = _miniGl.gl;\n    if (!context) {\n      console.warn('[MeshGradient] Failed to obtain WebGL context');\n      return;\n    }\n    (width && height && this.setSize(width, height),\n      _miniGl.lastDebugMsg,\n      (_miniGl.debug =\n        debug && debug_output\n          ? function (e) {\n              const t = new Date();\n              (t - _miniGl.lastDebugMsg > 1e3 && console.log('---'),\n                console.log(\n                  t.toLocaleTimeString() + Array(Math.max(0, 32 - e.length)).join(' ') + e + ': ',\n                  ...Array.from(arguments).slice(1)\n                ),\n                (_miniGl.lastDebugMsg = t));\n            }\n          : () => {}),\n      Object.defineProperties(_miniGl, {\n        Material: {","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/lib/meshGradient.js#L12-L48","documentation":"Neither 'webgl' nor 'webgl2' getContext returned a context for the mesh-gradient canvas, so the gradient renderer cannot initialize. Fires when the webview has WebGL disabled (software rendering fallback, GPU blocklisted, or context limits hit by too many live canvases) — the MiniGl constructor has no usable GL handle and subsequent shader/geometry setup is impossible.","triggerScenarios":"Thrown at app/src/lib/meshGradient.js:30 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify GPU acceleration is enabled for the webview (app/GPU driver settings); software rendering often omits WebGL","Close other WebGL-heavy tabs/windows — exceeding the browser's live context limit returns null","Update/reinstall GPU drivers if WebGL is unavailable system-wide","The gradient is decorative; the app remains usable without it"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}