paperclipai/paperclip · error

Plugin not found after status update: ${pluginId}

Error message

Plugin not found after status update: ${pluginId}

What it means

Post-update consistency guard in the plugin status transition path: after updating the plugin's status, registry.getById no longer finds the row. Defensive check against concurrent delete during enable/disable/load flows; the racing deletion is at fault.

Source

Thrown at server/src/services/plugin-loader.ts:2029

          "Cannot loadSingle: no PluginRuntimeServices provided. " +
            "Pass runtime services as the third argument to pluginLoader().",
        );
      }

      const plugin = (await registry.getById(pluginId)) as PluginRecord | null;
      if (!plugin) {
        throw new Error(`Plugin not found: ${pluginId}`);
      }

      // If the plugin is in 'installed' status, transition it to 'ready' first.
      // lifecycleManager.load() transitions the status AND activates the plugin
      // via activateReadyPlugin() → loadSingle() (recursive call with 'ready'
      // status) → activatePlugin(). We must NOT call activatePlugin() again here,
      // as that would double-start the worker and duplicate registrations.
      if (plugin.status === "installed") {
        await runtimeServices.lifecycleManager.load(pluginId);
        const updated = (await registry.getById(pluginId)) as PluginRecord | null;
        if (!updated) throw new Error(`Plugin not found after status update: ${pluginId}`);
        return {
          plugin: updated,
          success: true,
          registered: { worker: true, eventSubscriptions: 0, jobs: 0, webhooks: 0, tools: 0 },
        };
      }

      if (plugin.status !== "ready") {
        throw new Error(
          `Cannot load plugin in status '${plugin.status}'. ` +
            `Plugin must be in 'installed' or 'ready' status.`,
        );
      }

      return activatePlugin(plugin, {
        markErrorOnFailure: options.markErrorOnFailure ?? true,
      });
    },

View on GitHub (pinned to 120ae5428f)

Solutions

  1. The plugin disappeared during the status update (concurrent uninstall). Re-check the plugin list and retry against an existing plugin.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at server/src/services/plugin-loader.ts:2029 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/3eb4a1e5fcc3fe36. Report an issue: GitHub.