diegosouzapw/OmniRoute · error

Plugin directory '${row.pluginDir}' does not exist

Error message

Plugin directory '${row.pluginDir}' does not exist

What it means

Error "Plugin directory '${row.pluginDir}' does not exist" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/plugins/manager.ts:391

  async activate(name: string): Promise<void> {
    const row = getPluginByName(name);
    if (!row) throw new Error(`Plugin '${name}' not found`);
    // Guard on in-memory state, not DB status. DB status survives a restart but
    // loadedPlugins/hooks do not, so a DB-only check makes activate() a no-op for
    // every plugin already marked active — including the loadAll() boot path, whose
    // whole job is reloading exactly those. Hooks being fail-open, the plugin then
    // silently enforces nothing while the UI still reports it as active.
    if (row.status === "active" && this.loadedPlugins.has(name)) return;

    const manifest = JSON.parse(row.manifest) as PluginManifestWithDefaults;

    // Path traversal guard: use realpath to resolve symlinks
    const entryPoint = join(row.pluginDir, manifest.main);
    let resolvedPluginDir: string;
    try {
      resolvedPluginDir = await realpath(row.pluginDir);
    } catch {
      throw new Error(`Plugin directory '${row.pluginDir}' does not exist`);
    }
    const resolvedEntry = await realpath(entryPoint).catch(() => null);
    if (
      !resolvedEntry ||
      (!resolvedEntry.startsWith(resolvedPluginDir + sep) && resolvedEntry !== resolvedPluginDir)
    ) {
      throw new Error(`Plugin '${name}' entry point escapes plugin directory`);
    }

    try {
      const loaded = await loadPlugin(entryPoint, manifest);

      const hookNames: LifecycleHookName[] = [
        "onRequest",
        "onResponse",
        "onError",
        "onInstall",
        "onActivate",

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/plugins/manager.ts:391 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/28323f545fb4ee5b. Report an issue: GitHub.