ruvnet/ruflo · error

Failed to initialize ExoticBridge: ${error instanceof Error

Error message

Failed to initialize ExoticBridge: ${error instanceof Error ? error.message : String(error)}

What it means

ExoticBridge.initialize() failed: the dynamic import of @ruvector/exotic-wasm was rejected and the mock-module fallback path also threw, or another setup error occurred. _status is set to 'error' and the cause is wrapped so callers know the bridge never reached 'ready'; a later ensureInitialized() will surface this failure.

Source

Thrown at v3/plugins/quantum-optimizer/src/bridges/exotic-bridge.ts:119

    if (this._status === 'loading') return;

    this._status = 'loading';

    try {
      // Dynamic import - module may not be installed
      const wasmModule = await import(/* webpackIgnore: true */ '@ruvector/exotic-wasm' as string).catch(() => null);

      if (wasmModule) {
        this._module = wasmModule as unknown as ExoticWasmModule;
      } else {
        // Use mock module for development/testing
        this._module = this.createMockModule();
      }

      this._status = 'ready';
    } catch (error) {
      this._status = 'error';
      throw new Error(`Failed to initialize ExoticBridge: ${error instanceof Error ? error.message : String(error)}`);
    }
  }

  /**
   * Dispose of resources
   */
  async dispose(): Promise<void> {
    this._module = null;
    this._status = 'unloaded';
  }

  /**
   * Solve a QUBO problem using simulated quantum annealing
   */
  async solveQubo(
    problem: QUBOProblem,
    config: Partial<AnnealingConfig> = {}
  ): Promise<AnnealingResult> {

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Check the underlying initialization error; verify the WASM asset exists, is compatible, and required dependencies are loaded.
  2. Retry initialization after fixing the root cause; make the failure surface the original error message.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at v3/plugins/quantum-optimizer/src/bridges/exotic-bridge.ts:119 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/672108f6e6e39730. Report an issue: GitHub.