{"record":{"id":"0626400c612cf660","repo":"ruvnet/ruflo","slug":"failed-to-initialize-gnnbridge-error-instanceof","errorCode":null,"errorMessage":"Failed to initialize GnnBridge: ${error instanceof Error ? error.message : String(error)}","messagePattern":"Failed to initialize GnnBridge: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts","lineNumber":177,"sourceCode":"    if (this._status === 'ready') return;\n    if (this._status === 'loading') return;\n\n    this._status = 'loading';\n\n    try {\n      // Dynamic import - module may not be installed\n      const wasmModule = await import(/* webpackIgnore: true */ '@ruvector/gnn-wasm' as string).catch(() => null);\n\n      if (wasmModule) {\n        this._module = wasmModule as unknown as GnnWasmModule;\n      } else {\n        this._module = this.createMockModule();\n      }\n\n      this._status = 'ready';\n    } catch (error) {\n      this._status = 'error';\n      throw new Error(`Failed to initialize GnnBridge: ${error instanceof Error ? error.message : String(error)}`);\n    }\n  }\n\n  /**\n   * Dispose of resources\n   */\n  async dispose(): Promise<void> {\n    this._module = null;\n    this._status = 'unloaded';\n  }\n\n  /**\n   * Forward pass through GNN\n   */\n  forward(graph: Graph, config: Partial<GnnConfig> = {}): GnnResult {\n    if (!this._module) {\n      throw new Error('GnnBridge not initialized');\n    }","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts#L159-L195","documentation":"GnnBridge.initialize() hit an unexpected exception while dynamically importing the GNN WASM module (beyond the tolerated import-miss, which falls back to a mock). The status is set to 'error' and the original failure text is embedded so the loader problem is visible.","triggerScenarios":"Thrown at v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts:177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the underlying initialization error; verify the WASM asset exists, is compatible, and required dependencies are loaded.","Retry initialization after fixing the root cause; make the failure surface the original error message."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}