{"record":{"id":"c80f0447b3d07653","repo":"FlowiseAI/Flowise","slug":"invalid-json-in-the-additional-configuration-c80f04","errorCode":null,"errorMessage":"Invalid JSON in the Additional Configuration: ","messagePattern":"Invalid JSON in the Additional Configuration: ","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/memory/AgentMemory/SQLiteAgentMemory/SQLiteAgentMemory.ts","lineNumber":65,"sourceCode":"                additionalParams: true,\n                optional: true\n            }\n        ]\n    }\n\n    async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {\n        const additionalConfig = nodeData.inputs?.additionalConfig as string\n        const databaseEntities = options.databaseEntities as IDatabaseEntity\n        const chatflowid = options.chatflowid as string\n        const appDataSource = options.appDataSource as DataSource\n        const orgId = options.orgId as string\n\n        let additionalConfiguration = {}\n        if (additionalConfig) {\n            try {\n                additionalConfiguration = typeof additionalConfig === 'object' ? additionalConfig : JSON.parse(additionalConfig)\n            } catch (exception) {\n                throw new Error('Invalid JSON in the Additional Configuration: ' + exception)\n            }\n            additionalConfiguration = sanitizeDataSourceOptions(additionalConfiguration)\n        }\n\n        const threadId = options.sessionId || options.chatId\n\n        const database = validateSQLitePath(path.join(process.env.DATABASE_PATH ?? path.join(getUserHome(), '.flowise'), 'database.sqlite'))\n\n        const datasourceOptions: ICommonObject = mergeDataSourceOptions(\n            {\n                database,\n                type: 'sqlite'\n            },\n            additionalConfiguration\n        )\n\n        const args: SaverOptions = {\n            datasourceOptions,","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/memory/AgentMemory/SQLiteAgentMemory/SQLiteAgentMemory.ts#L47-L83","documentation":"Thrown by SQLiteAgentMemory.init() when the user supplied an additionalConfig string but JSON.parse() rejects it. The parse exception is appended to the message. The parsed result is then passed through sanitizeDataSourceOptions before being merged into the SQLite datasource options.","triggerScenarios":"Setting nodeData.inputs.additionalConfig to a non-empty string that is not valid JSON: trailing commas, single quotes, unquoted keys, stray backticks, copy-paste artifacts, or template placeholders like ${DATABASE_PATH} left in.","commonSituations":"Hand-editing the additional configuration field in the Flowise UI. Copying TypeORM snippet examples that use JS object literal syntax instead of JSON. Locale-specific smart quotes replacing ASCII quotes.","solutions":["Paste additionalConfig into a JSON validator (jsonlint) and fix the syntax error cited in the message.","Use double quotes for all keys and string values, remove trailing commas, drop comments.","Leave additionalConfig empty if you do not need extra TypeORM SQLite options — it is optional.","If you need a JS expression, switch to a valid JSON representation (e.g. \"{ \\\"busyTimeout\\\": 3000 }\")."],"exampleFix":"// before\nadditionalConfig: \"{ cache: true, }\"\n// after\nadditionalConfig: \"{ \\\"cache\\\": true }\"","handlingStrategy":"validation","validationCode":"function parseAdditionalConfig(raw: unknown): Record<string, unknown> {\n  if (raw == null || raw === '') return {}\n  if (typeof raw === 'object') return raw as Record<string, unknown>\n  if (typeof raw !== 'string') throw new Error('additionalConfig must be a JSON string or object')\n  try {\n    return JSON.parse(raw)\n  } catch (e) {\n    throw new Error(`additionalConfig is not valid JSON: ${(e as Error).message}`)\n  }\n}\n// call before passing nodeData.inputs.additionalConfig through","typeGuard":"function isJsonString(v: unknown): v is string {\n  if (typeof v !== 'string') return false\n  try { JSON.parse(v); return true } catch { return false }\n}","tryCatchPattern":"try {\n  additionalConfiguration = typeof additionalConfig === 'object' ? additionalConfig : JSON.parse(additionalConfig)\n} catch (exception) {\n  // rethrow with the specific JSON parse details rather than the generic suffix\n  throw new Error(`Invalid JSON in the Additional Configuration: ${(exception as Error).message}`)\n}","preventionTips":["Validate additionalConfig in the UI with a JSON schema before saving the node.","Prefer object-typed inputs over free-text JSON when the host allows it.","Run user-supplied JSON through a linter before deployment."],"tags":["sqlite","configuration","json-parse","validation","datasource"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}