FlowiseAI/Flowise · error · Error

Error listing checkpoints

Error message

Error listing checkpoints

What it means

MySQLSaver.list wraps the listing SELECT (with optional LIMIT interpolated directly); any DB error is logged via console.error and re-thrown as 'Error listing checkpoints'.

Source

Thrown at packages/components/nodes/memory/AgentMemory/MySQLAgentMemory/mysqlSaver.ts:161

                                checkpoint_id: row.checkpoint_id
                            }
                        },
                        checkpoint: (await this.serde.parse(row.checkpoint.toString())) as Checkpoint,
                        metadata: (await this.serde.parse(row.metadata.toString())) as CheckpointMetadata,
                        parentConfig: row.parent_id
                            ? {
                                  configurable: {
                                      thread_id: row.thread_id,
                                      checkpoint_id: row.parent_id
                                  }
                              }
                            : undefined
                    }
                }
            }
        } catch (error) {
            console.error(`Error listing checkpoints`, error)
            throw new Error(`Error listing checkpoints`)
        } finally {
            await dataSource.destroy()
        }
    }

    async put(config: RunnableConfig, checkpoint: Checkpoint, metadata: CheckpointMetadata): Promise<RunnableConfig> {
        const dataSource = await this.getDataSource()
        await this.setup(dataSource)

        if (!config.configurable?.checkpoint_id) return {}
        try {
            const queryRunner = dataSource.createQueryRunner()
            const row = [
                config.configurable?.thread_id || this.threadId,
                checkpoint.id,
                config.configurable?.checkpoint_id,
                Buffer.from(this.serde.stringify(checkpoint)), // Encode to binary
                Buffer.from(this.serde.stringify(metadata)) // Encode to binary

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Check server/console logs for the original error.
  2. Ensure limit (if provided) is a positive integer before calling list.
  3. Verify the checkpoints table exists with the expected schema and SELECT privileges.
  4. Add an index or bound the listing if the table is large.

Example fix

// before
for await (const t of saver.list(cfg, 'ten')) {}
// after
for await (const t of saver.list(cfg, 10)) {}
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate limit is a positive integer before calling list (it is interpolated into SQL)
function safeLimit(n: unknown): number | undefined {
  if (n == null) return undefined
  const i = Number(n)
  if (!Number.isInteger(i) || i <= 0) throw new Error('limit must be a positive integer')
  return i
}

Type guard

function isPositiveInt(n: unknown): n is number {
  return typeof n === 'number' && Number.isInteger(n) && n > 0
}

Try / catch

try {
  for await (const t of saver.list(cfg, safeLimit(limit))) { /* ... */ }
} catch (e) {
  if (/Error listing checkpoints/.test((e as Error).message)) {
    // inspect logs; verify table and SELECT privilege
  }
  throw e
}

Prevention

When it happens

Trigger: Connection drop during the list query; malformed limit value interpolated into LIMIT ${limit}; table/schema drift; permission error.

Common situations: limit passed as a non-numeric value causing SQL syntax error; long-running enumeration over a large checkpoints table timing out; revoked SELECT.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/9e177dd46ea3dcc8. Report an issue: GitHub.