{"record":{"id":"984a6c3cd3a9a69b","repo":"n8n-io/n8n","slug":"no-binary-data-received","errorCode":null,"errorMessage":"No binary data received.","messagePattern":"No binary data received\\.","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.ts","lineNumber":16,"sourceCode":"import { DataSource } from '@n8n/typeorm';\nimport * as fs from 'fs';\nimport type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';\nimport { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow';\nimport * as sqlite3 from 'sqlite3';\nimport * as temp from 'temp';\n\nexport async function getSqliteDataSource(\n\tthis: IExecuteFunctions,\n\tbinary: INodeExecutionData['binary'],\n\tbinaryPropertyName = 'data',\n): Promise<DataSource> {\n\tconst binaryData = binary?.[binaryPropertyName];\n\n\tif (!binaryData) {\n\t\tthrow new NodeOperationError(this.getNode(), 'No binary data received.');\n\t}\n\n\tlet fileBase64;\n\tif (binaryData.id) {\n\t\tconst chunkSize = 256 * 1024;\n\t\tconst stream = await this.helpers.getBinaryStream(binaryData.id, chunkSize);\n\t\tconst buffer = await this.helpers.binaryToBuffer(stream);\n\t\tfileBase64 = buffer.toString('base64');\n\t} else {\n\t\tfileBase64 = binaryData.data;\n\t}\n\n\tconst bufferString = Buffer.from(fileBase64, BINARY_ENCODING);\n\n\t// Track and cleanup temp files at exit\n\ttemp.track();\n\n\tconst tempDbPath = temp.path({ suffix: '.sqlite' });","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.ts#L1-L34","documentation":"Thrown inside getSqliteDataSource when the requested binary property is missing on the item — i.e. item.binary exists (so error 643 did not fire) but item.binary[binaryPropertyName] is undefined. Default binaryPropertyName is 'data'.","triggerScenarios":"SQL Agent in SQLite mode where item.binary is present but the binary blob lives under a different property name than 'data' (or the configured binaryPropertyName).","commonSituations":"Upstream node wrote binary under a custom property name (e.g. 'attachment', 'file'); user changed 'Binary Property' in the Read Binary File node but not in the SQL Agent; binary was renamed mid-pipeline.","solutions":["Open the SQL Agent options and set 'Binary Property Name' to match the upstream output (inspect $binary keys).","Use a Set node or Rename Binary Data to normalize the property name to 'data' before the agent.","Inspect the incoming item's binary keys via the executions view to find the correct name."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i, 'data') as string;\nif (!item.binary?.[binaryPropertyName]) {\n  throw new NodeOperationError(this.getNode(), `Binary property '${binaryPropertyName}' not found. Available: ${Object.keys(item.binary ?? {}).join(', ') || 'none'}`);\n}","typeGuard":"function hasBinaryProperty(item: INodeExecutionData, name: string): boolean {\n  return !!item.binary?.[name];\n}","tryCatchPattern":null,"preventionTips":["Inspect the upstream item's $binary keys and match the binaryPropertyName accordingly.","Normalize binary property names to 'data' with a Set/Rename node upstream.","Document the expected binary property name in the workflow notes."],"tags":["langchain","agent","sql","sqlite","binary","configuration"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}