paperclipai/paperclip · error · Error

Plugin database namespace is not active

Error message

Plugin database namespace is not active

What it means

Runtime readiness guard in getRuntimeNamespace: the plugin's database namespace row is missing or its status is not active (e.g. plugin disabled, install rolled back, namespace never provisioned). Runtime SQL must not run until the namespace is active; the plugin's namespace lifecycle state is at fault.

Source

Thrown at server/src/services/plugin-database.ts:416

  }

  async function ensureNamespace(pluginId: string, manifest: PaperclipPluginManifestV1) {
    return ensureNamespaceWithClient(db, pluginId, manifest);
  }

  async function getNamespace(pluginId: string) {
    const rows = await db
      .select()
      .from(pluginDatabaseNamespaces)
      .where(eq(pluginDatabaseNamespaces.pluginId, pluginId))
      .limit(1);
    return rows[0] ?? null;
  }

  async function getRuntimeNamespace(pluginId: string) {
    const namespace = await getNamespace(pluginId);
    if (!namespace || namespace.status !== "active") {
      throw new Error("Plugin database namespace is not active");
    }
    return namespace.namespaceName;
  }

  async function recordMigrationFailure(client: PluginDatabaseClient, input: {
    pluginId: string;
    pluginKey: string;
    namespaceName: string;
    migrationKey: string;
    checksum: string;
    pluginVersion: string;
    error: unknown;
  }): Promise<void> {
    const message = input.error instanceof Error ? input.error.message : String(input.error);
    await client
      .insert(pluginMigrations)
      .values({
        pluginId: input.pluginId,

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Activate the plugin database namespace (run plugin migrations/setup) before using ctx.db.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/plugin-database.ts:416 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/531d68a46625c4d0. Report an issue: GitHub.