{"record":{"id":"e9ecabd986ffb58c","repo":"ruvnet/ruflo","slug":"initialization-failed","errorCode":"INITIALIZATION_FAILED","errorMessage":"Failed to initialize plugin '${plugin.name}': ${error}","messagePattern":"Failed to initialize plugin '(.+?)': (.+?)","errorType":"exception","errorClass":"PluginError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/shared/src/plugin-loader.ts","lineNumber":339,"sourceCode":"  /**\n   * Initialize a single plugin\n   */\n  private async initializePlugin(plugin: ClaudeFlowPlugin, context: PluginContext): Promise<void> {\n    this.registry.updatePluginState(plugin.name, 'initializing');\n\n    try {\n      // Run initialization with timeout\n      await this.withTimeout(\n        plugin.initialize(context),\n        this.config.initializationTimeout,\n        `Plugin '${plugin.name}' initialization timed out`\n      );\n\n      this.registry.updatePluginState(plugin.name, 'initialized');\n      this.registry.collectPluginMetrics(plugin.name);\n    } catch (error) {\n      this.registry.updatePluginState(plugin.name, 'error', error instanceof Error ? error : new Error(String(error)));\n      throw new PluginError(\n        `Failed to initialize plugin '${plugin.name}': ${error}`,\n        plugin.name,\n        'INITIALIZATION_FAILED',\n        error instanceof Error ? error : undefined\n      );\n    }\n  }\n\n  /**\n   * Shutdown a single plugin\n   */\n  private async shutdownPlugin(plugin: ClaudeFlowPlugin): Promise<void> {\n    this.registry.updatePluginState(plugin.name, 'shutting-down');\n\n    try {\n      await this.withTimeout(\n        plugin.shutdown(),\n        this.config.shutdownTimeout,","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/shared/src/plugin-loader.ts#L321-L357","documentation":"PluginLoader.initializePlugin caught a failure (or timeout) from the plugin's own initialize(context) hook and rethrew as PluginError after marking the plugin's state 'error'. The root cause is the plugin's initialization code, not the loader; the message names the plugin and the underlying error.","triggerScenarios":"Thrown at v3/@claude-flow/shared/src/plugin-loader.ts:339 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the wrapped error to fix the plugin's initialize() failure.","Verify the plugin's dependencies and configuration are present before loading."],"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"}