{"record":{"id":"28323f545fb4ee5b","repo":"diegosouzapw/OmniRoute","slug":"plugin-directory-row-plugindir-does-not-exist","errorCode":null,"errorMessage":"Plugin directory '${row.pluginDir}' does not exist","messagePattern":"Plugin directory '(.+?)' does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/plugins/manager.ts","lineNumber":391,"sourceCode":"  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);\n    if (\n      !resolvedEntry ||\n      (!resolvedEntry.startsWith(resolvedPluginDir + sep) && resolvedEntry !== resolvedPluginDir)\n    ) {\n      throw new Error(`Plugin '${name}' entry point escapes plugin directory`);\n    }\n\n    try {\n      const loaded = await loadPlugin(entryPoint, manifest);\n\n      const hookNames: LifecycleHookName[] = [\n        \"onRequest\",\n        \"onResponse\",\n        \"onError\",\n        \"onInstall\",\n        \"onActivate\",","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/plugins/manager.ts#L373-L409","documentation":"Error \"Plugin directory '${row.pluginDir}' does not exist\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/plugins/manager.ts:391 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"}