{"record":{"id":"cc110be807683d7a","repo":"FlowiseAI/Flowise","slug":"error-retrieving-this-tablename","errorCode":null,"errorMessage":"Error retrieving ${this.tableName}","messagePattern":"Error retrieving (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/memory/AgentMemory/MySQLAgentMemory/mysqlSaver.ts","lineNumber":112,"sourceCode":"                            thread_id: row.thread_id || thread_id,\n                            checkpoint_id: row.checkpoint_id || checkpoint_id\n                        }\n                    },\n                    checkpoint: (await this.serde.parse(row.checkpoint.toString())) as Checkpoint,\n                    metadata: (await this.serde.parse(row.metadata.toString())) as CheckpointMetadata,\n                    parentConfig: row.parent_id\n                        ? {\n                              configurable: {\n                                  thread_id,\n                                  checkpoint_id: row.parent_id\n                              }\n                          }\n                        : undefined\n                }\n            }\n        } catch (error) {\n            console.error(`Error retrieving ${this.tableName}`, error)\n            throw new Error(`Error retrieving ${this.tableName}`)\n        } finally {\n            await dataSource.destroy()\n        }\n        return undefined\n    }\n\n    async *list(config: RunnableConfig, limit?: number, before?: RunnableConfig): AsyncGenerator<CheckpointTuple, void, unknown> {\n        const dataSource = await this.getDataSource()\n        await this.setup(dataSource)\n        const queryRunner = dataSource.createQueryRunner()\n        try {\n            const threadId = config.configurable?.thread_id || this.threadId\n            const tableName = this.sanitizeTableName(this.tableName)\n            let sql = `SELECT thread_id, checkpoint_id, parent_id, checkpoint, metadata FROM ${tableName} WHERE thread_id = ? ${\n                before ? 'AND checkpoint_id < ?' : ''\n            } ORDER BY checkpoint_id DESC`\n            if (limit) {\n                sql += ` LIMIT ${limit}`","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/memory/AgentMemory/MySQLAgentMemory/mysqlSaver.ts#L94-L130","documentation":"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.","triggerScenarios":"Corrupted/unparseable checkpoint or metadata BLOB; connection lost during read; table missing or schema-drifted; serde.parse mismatch after a LangGraph version change.","commonSituations":"Checkpoint written by an older serde version; partial write left a malformed BLOB; table dropped/recreated between writes and reads.","solutions":["Check console logs for the underlying error (DB vs serde parse).","Confirm setup() has run and the checkpoints table matches the expected schema.","If serde drift, clear stale rows for the thread and let new checkpoints write cleanly.","Verify DB connectivity and user SELECT privilege."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-flight sanity: ensure the table and a readable row shape exist\nasync function verifyCheckpointsTable(ds: import('typeorm').DataSource, table: string): Promise<void> {\n  const qr = ds.createQueryRunner()\n  try { await qr.query(`SELECT 1 FROM ${table} LIMIT 1`) } finally { await qr.release() }\n}","typeGuard":null,"tryCatchPattern":"try {\n  await saver.getTuple(config)\n} catch (e) {\n  if (/Error retrieving/.test((e as Error).message)) {\n    // inspect console logs: serde parse vs DB error, then remediate\n  }\n  throw e\n}","preventionTips":["Keep serde/LangGraph versions aligned across writes and reads.","Avoid manually editing checkpoint BLOBs.","Pin the checkpoints table schema across deploys.","Monitor console.error for the original stack."],"tags":["mysql","agent-memory","database","query","retrieval","memory"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}