{"record":{"id":"a845b69e8773b995","repo":"tinyhumansai/openhuman","slug":"meshgradient-init-failed-gradient-disabled","errorCode":null,"errorMessage":"[MeshGradient] init failed, gradient disabled:","messagePattern":"\\[MeshGradient\\] init failed, gradient disabled:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/lib/meshGradient.js","lineNumber":724,"sourceCode":"    ((this.isGradientLegendVisible = !1),\n      document.body && document.body.classList.remove('isGradientLegendVisible'));\n  }\n  init() {\n    if (this.destroyed) {\n      console.debug('[MeshGradient] init skipped — gradient already disconnected');\n      return;\n    }\n    try {\n      (this.initGradientColors(),\n        this.initMesh(),\n        this.resize(),\n        // Track this first frame like every other one: `disconnect()` only\n        // cancels `animateRaf`, so leaving this handle unstored let the opening\n        // frame outlive teardown — the exact leak this change set closes.\n        (this.animateRaf = requestAnimationFrame(this.animate)),\n        window.addEventListener('resize', this.resize));\n    } catch (err) {\n      console.warn('[MeshGradient] init failed, gradient disabled:', err);\n    }\n  }\n  /*\n   * Waiting for the css variables to become available, usually on page load before we can continue.\n   * Using default colors assigned below if no variables have been found after maxCssVarRetries\n   */\n  waitForCssVars() {\n    if (this.destroyed) {\n      console.debug('[MeshGradient] waitForCssVars stopped — gradient disconnected');\n      return;\n    }\n    if (\n      this.computedCanvasStyle &&\n      -1 !== this.computedCanvasStyle.getPropertyValue('--gradient-color-1').indexOf('#')\n    )\n      (this.init(), this.addIsLoadedClass());\n    else {\n      if (((this.cssVarRetries += 1), this.cssVarRetries > this.maxCssVarRetries)) {","sourceCodeStart":706,"sourceCodeEnd":742,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/lib/meshGradient.js#L706-L742","documentation":"Caught bootstrap failure of the MeshGradient visual component: init() chains initGradientColors, initMesh, resize and frame tracking inside one try; any throw (missing canvas context, invalid gradient config, detached DOM) is caught, warned, and the gradient is disabled for the session — the app continues without the animated background.","triggerScenarios":"Thrown at app/src/lib/meshGradient.js:724 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Accept degradation — the gradient is cosmetic and non-load-bearing","Check for a missing 2D canvas context or unsupported browser API as the usual cause","Ensure disconnect()/destroy flags are honored before re-init to avoid repeat failures"],"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-14T00:17:10.932Z"}