tinyhumansai/openhuman · error
[MeshGradient] Failed to obtain WebGL context
Error message
[MeshGradient] Failed to obtain WebGL context
What it means
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.
Source
Thrown at app/src/lib/meshGradient.js:30
return [((hexCode >> 16) & 255) / 255, ((hexCode >> 8) & 255) / 255, (255 & hexCode) / 255];
}
['SCREEN', 'LINEAR_LIGHT'].reduce((hexCode, t, n) => Object.assign(hexCode, { [t]: n }), {});
//Essential functionality of WebGl
//t = width
//n = height
class MiniGl {
constructor(canvas, width, height, debug = false) {
const _miniGl = this,
debug_output = -1 !== document.location.search.toLowerCase().indexOf('debug=webgl');
((_miniGl.canvas = canvas),
(_miniGl.gl =
_miniGl.canvas.getContext('webgl', { antialias: true }) ||
_miniGl.canvas.getContext('webgl2', { antialias: true })),
(_miniGl.meshes = []));
const context = _miniGl.gl;
if (!context) {
console.warn('[MeshGradient] Failed to obtain WebGL context');
return;
}
(width && height && this.setSize(width, height),
_miniGl.lastDebugMsg,
(_miniGl.debug =
debug && debug_output
? function (e) {
const t = new Date();
(t - _miniGl.lastDebugMsg > 1e3 && console.log('---'),
console.log(
t.toLocaleTimeString() + Array(Math.max(0, 32 - e.length)).join(' ') + e + ': ',
...Array.from(arguments).slice(1)
),
(_miniGl.lastDebugMsg = t));
}
: () => {}),
Object.defineProperties(_miniGl, {
Material: {View on GitHub (pinned to 7491200858)
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at app/src/lib/meshGradient.js:30 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/f18ef98f259c1d97.
Report an issue: GitHub.