FlowiseAI/Flowise · error · Error

Error retrieving ${this.tableName}

Error message

Error retrieving ${this.tableName}

What it means

MySQLSaver.getTuple wraps the checkpoint SELECT; any DB or serde error is logged via console.error and re-thrown generically using this.tableName. The dataSource is always destroyed in finally.

Source

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

                            thread_id: row.thread_id || thread_id,
                            checkpoint_id: row.checkpoint_id || 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,
                                  checkpoint_id: row.parent_id
                              }
                          }
                        : undefined
                }
            }
        } catch (error) {
            console.error(`Error retrieving ${this.tableName}`, error)
            throw new Error(`Error retrieving ${this.tableName}`)
        } finally {
            await dataSource.destroy()
        }
        return undefined
    }

    async *list(config: RunnableConfig, limit?: number, before?: RunnableConfig): AsyncGenerator<CheckpointTuple, void, unknown> {
        const dataSource = await this.getDataSource()
        await this.setup(dataSource)
        const queryRunner = dataSource.createQueryRunner()
        try {
            const threadId = config.configurable?.thread_id || this.threadId
            const tableName = this.sanitizeTableName(this.tableName)
            let sql = `SELECT thread_id, checkpoint_id, parent_id, checkpoint, metadata FROM ${tableName} WHERE thread_id = ? ${
                before ? 'AND checkpoint_id < ?' : ''
            } ORDER BY checkpoint_id DESC`
            if (limit) {
                sql += ` LIMIT ${limit}`

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Check console logs for the underlying error (DB vs serde parse).
  2. Confirm setup() has run and the checkpoints table matches the expected schema.
  3. If serde drift, clear stale rows for the thread and let new checkpoints write cleanly.
  4. Verify DB connectivity and user SELECT privilege.
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-flight sanity: ensure the table and a readable row shape exist
async function verifyCheckpointsTable(ds: import('typeorm').DataSource, table: string): Promise<void> {
  const qr = ds.createQueryRunner()
  try { await qr.query(`SELECT 1 FROM ${table} LIMIT 1`) } finally { await qr.release() }
}

Try / catch

try {
  await saver.getTuple(config)
} catch (e) {
  if (/Error retrieving/.test((e as Error).message)) {
    // inspect console logs: serde parse vs DB error, then remediate
  }
  throw e
}

Prevention

When it happens

Trigger: Corrupted/unparseable checkpoint or metadata BLOB; connection lost during read; table missing or schema-drifted; serde.parse mismatch after a LangGraph version change.

Common situations: Checkpoint written by an older serde version; partial write left a malformed BLOB; table dropped/recreated between writes and reads.

Related errors


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