{"record":{"id":"aaa1d696b8cd71cb","repo":"ruvnet/ruflo","slug":"wasmbridge-not-initialized-call-initialize-firs","errorCode":null,"errorMessage":"WasmBridge not initialized. Call initialize() first or await the initialization promise.","messagePattern":"WasmBridge not initialized\\. Call initialize\\(\\) first or await the initialization promise\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/plugins/prime-radiant/src/wasm-bridge.ts","lineNumber":464,"sourceCode":"    this.spectralEngine = null;\n    this.causalEngine = null;\n    this.quantumEngine = null;\n    this.categoryEngine = null;\n    this.hottEngine = null;\n    this.initialized = false;\n    this.initPromise = null;\n\n    if (this.config.enableLogging) {\n      console.log('[Prime Radiant] WASM bridge disposed');\n    }\n  }\n\n  /**\n   * Ensure bridge is initialized before use\n   */\n  private ensureInitialized(): void {\n    if (!this.initialized) {\n      throw new Error(\n        'WasmBridge not initialized. Call initialize() first or await the initialization promise.'\n      );\n    }\n  }\n}\n\n/**\n * Create a pre-configured WASM bridge instance\n */\nexport function createWasmBridge(config?: WasmBridgeConfig): WasmBridge {\n  return new WasmBridge(config);\n}\n\n/**\n * Create and initialize a WASM bridge\n */\nexport async function initializeWasmBridge(config?: WasmBridgeConfig): Promise<WasmBridge> {\n  const bridge = new WasmBridge(config);","sourceCodeStart":446,"sourceCodeEnd":482,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/prime-radiant/src/wasm-bridge.ts#L446-L482","documentation":"Guard in ensureInitialized(): a getter for one of the WASM engines (spectral, causal, quantum, category, hott, cohomology) was invoked after dispose() or before initialize() resolved, so this.initialized is still false. The bridge instance is in an unusable lifecycle state, not a WASM failure itself.","triggerScenarios":"Thrown at v3/plugins/prime-radiant/src/wasm-bridge.ts:464 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the module/bridge/plugin initialize() method has been called and awaited before invoking this operation.","Guard against calls made during startup: await the initialization promise or check the initialized flag and fail fast with a clear setup hint."],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}