{"record":{"id":"685ad1279014221b","repo":"diegosouzapw/OmniRoute","slug":"plugin-name-not-found","errorCode":null,"errorMessage":"Plugin '${name}' not found","messagePattern":"Plugin '(.+?)' not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/plugins/manager.ts","lineNumber":375,"sourceCode":"      pluginDir: destDir,\n      enabled: manifest.enabledByDefault,\n    });\n\n    log.info(\"manager.upgraded\", { name, version: manifest.version });\n\n    if (manifest.enabledByDefault) {\n      await this.activate(name);\n    }\n\n    return row;\n  }\n\n  /**\n   * Activate a plugin — load into VM, register hooks, update DB.\n   */\n  async activate(name: string): Promise<void> {\n    const row = getPluginByName(name);\n    if (!row) throw new Error(`Plugin '${name}' not found`);\n    // Guard on in-memory state, not DB status. DB status survives a restart but\n    // loadedPlugins/hooks do not, so a DB-only check makes activate() a no-op for\n    // every plugin already marked active — including the loadAll() boot path, whose\n    // whole job is reloading exactly those. Hooks being fail-open, the plugin then\n    // silently enforces nothing while the UI still reports it as active.\n    if (row.status === \"active\" && this.loadedPlugins.has(name)) return;\n\n    const manifest = JSON.parse(row.manifest) as PluginManifestWithDefaults;\n\n    // Path traversal guard: use realpath to resolve symlinks\n    const entryPoint = join(row.pluginDir, manifest.main);\n    let resolvedPluginDir: string;\n    try {\n      resolvedPluginDir = await realpath(row.pluginDir);\n    } catch {\n      throw new Error(`Plugin directory '${row.pluginDir}' does not exist`);\n    }\n    const resolvedEntry = await realpath(entryPoint).catch(() => null);","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/plugins/manager.ts#L357-L393","documentation":"Error \"Plugin '${name}' not found\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/plugins/manager.ts:375 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}