FlowiseAI/Flowise · error · Error

Error listing ${tableName}

Error message

Error listing ${tableName}

What it means

Thrown by SQLiteSaver.list() async generator when the SELECT listing query fails. Entire generator is one try block; finally destroys the dataSource.

Source

Thrown at packages/components/nodes/memory/AgentMemory/SQLiteAgentMemory/sqliteSaver.ts:186

                                checkpoint_id: row.checkpoint_id
                            }
                        },
                        checkpoint: (await this.serde.parse(row.checkpoint)) as Checkpoint,
                        metadata: (await this.serde.parse(row.metadata)) as CheckpointMetadata,
                        parentConfig: row.parent_id
                            ? {
                                  configurable: {
                                      thread_id: row.thread_id,
                                      checkpoint_id: row.parent_id
                                  }
                              }
                            : undefined
                    }
                }
            }
        } catch (error) {
            console.error(`Error listing ${tableName}`, error)
            throw new Error(`Error listing ${tableName}`)
        } 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,
                this.serde.stringify(checkpoint),
                this.serde.stringify(metadata)

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Inspect console.error for the underlying SQLite error code.
  2. Migrate/recreate the checkpoints table.
  3. Confirm limit is a positive number and before (if any) carries a string checkpoint_id.
  4. Tune busy_timeout / WAL to reduce read-lock contention.
  5. Maintainer: rethrow with cause.

Example fix

// before
} catch (error) {
    console.error(`Error listing ${tableName}`, error)
    throw new Error(`Error listing ${tableName}`)
}
// after
} catch (error) {
    throw new Error(`Error listing ${tableName}: ${(error as Error).message}`, { cause: error })
}
Defensive patterns

Strategy: try-catch

Validate before calling

function validateListArgs(limit?: number, before?: { configurable?: { checkpoint_id?: unknown } }) {
  if (limit !== undefined && (!Number.isInteger(limit) || limit <= 0)) throw new Error('limit must be a positive integer')
  if (before && before.configurable?.checkpoint_id !== undefined && typeof before.configurable.checkpoint_id !== 'string') {
    throw new Error('before.configurable.checkpoint_id must be a string')
  }
}

Type guard

function isSqliteListError(e: unknown): boolean {
  return e instanceof Error && /^Error listing .+$/.test(e.message)
}

Try / catch

try {
  for await (const tuple of sqliteSaver.list(config, limit, before)) { /* ... */ }
} catch (e) {
  if (e instanceof Error && /Error listing/.test(e.message)) {
    // verify table/schema; enable WAL/busy_timeout; check file perms
  }
  throw e
}

Prevention

When it happens

Trigger: Iterating list() when the table is missing, schema drifts, file is locked, or limit/before parameters are malformed.

Common situations: History-listing UI flows failing after upgrade. Locked SQLite under parallel reads. Wrong tableName.

Related errors


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