FlowiseAI/Flowise · error · Error
Invalid JSON in the Additional Configuration:
Error message
Invalid JSON in the Additional Configuration:
What it means
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.
Source
Thrown at packages/components/nodes/memory/AgentMemory/SQLiteAgentMemory/SQLiteAgentMemory.ts:65
additionalParams: true,
optional: true
}
]
}
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
const additionalConfig = nodeData.inputs?.additionalConfig as string
const databaseEntities = options.databaseEntities as IDatabaseEntity
const chatflowid = options.chatflowid as string
const appDataSource = options.appDataSource as DataSource
const orgId = options.orgId as string
let additionalConfiguration = {}
if (additionalConfig) {
try {
additionalConfiguration = typeof additionalConfig === 'object' ? additionalConfig : JSON.parse(additionalConfig)
} catch (exception) {
throw new Error('Invalid JSON in the Additional Configuration: ' + exception)
}
additionalConfiguration = sanitizeDataSourceOptions(additionalConfiguration)
}
const threadId = options.sessionId || options.chatId
const database = validateSQLitePath(path.join(process.env.DATABASE_PATH ?? path.join(getUserHome(), '.flowise'), 'database.sqlite'))
const datasourceOptions: ICommonObject = mergeDataSourceOptions(
{
database,
type: 'sqlite'
},
additionalConfiguration
)
const args: SaverOptions = {
datasourceOptions,View on GitHub (pinned to abe4a8601a)
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 }").
Example fix
// before
additionalConfig: "{ cache: true, }"
// after
additionalConfig: "{ \"cache\": true }" Defensive patterns
Strategy: validation
Validate before calling
function parseAdditionalConfig(raw: unknown): Record<string, unknown> {
if (raw == null || raw === '') return {}
if (typeof raw === 'object') return raw as Record<string, unknown>
if (typeof raw !== 'string') throw new Error('additionalConfig must be a JSON string or object')
try {
return JSON.parse(raw)
} catch (e) {
throw new Error(`additionalConfig is not valid JSON: ${(e as Error).message}`)
}
}
// call before passing nodeData.inputs.additionalConfig through Type guard
function isJsonString(v: unknown): v is string {
if (typeof v !== 'string') return false
try { JSON.parse(v); return true } catch { return false }
} Try / catch
try {
additionalConfiguration = typeof additionalConfig === 'object' ? additionalConfig : JSON.parse(additionalConfig)
} catch (exception) {
// rethrow with the specific JSON parse details rather than the generic suffix
throw new Error(`Invalid JSON in the Additional Configuration: ${(exception as Error).message}`)
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- Invalid JSON in executeFlowOverrideConfig: ${parseError.mess
- Invalid table name
- Invalid SQLite path: database path is required
- Invalid SQLite path: path must be within allowed directories
- chatflowId must be a valid array
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/c80f0447b3d07653.
Report an issue: GitHub.