FlowiseAI/Flowise · error · Error

Invalid JSON in the Additional Configuration: ${exception}

Error message

Invalid JSON in the Additional Configuration: ${exception}

What it means

SQLite analog of error 265. Thrown by SQLiteRecordManager.init when additionalConfig is a non-empty string that JSON.parse rejects. Same shape as the Postgres manager: object-pass-through first, then JSON.parse, then this catch with the parse exception appended.

Source

Thrown at packages/components/nodes/recordmanager/SQLiteRecordManager/SQLiteRecordManager.ts:119

        ]
    }

    async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
        const _tableName = nodeData.inputs?.tableName as string
        const tableName = sanitizeRecordManagerTableName(_tableName ? _tableName : 'upsertion_records')
        const additionalConfig = nodeData.inputs?.additionalConfig as string
        const _namespace = nodeData.inputs?.namespace as string
        const namespace = _namespace ? sanitizeRecordManagerNamespace(_namespace) : options.chatflowid
        const cleanup = nodeData.inputs?.cleanup as string
        const _sourceIdKey = nodeData.inputs?.sourceIdKey as string
        const sourceIdKey = _sourceIdKey ? _sourceIdKey : 'source'

        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 database = validateSQLitePath(path.join(process.env.DATABASE_PATH ?? path.join(getUserHome(), '.flowise'), 'database.sqlite'))

        const sqliteOptions = mergeDataSourceOptions(
            {
                database,
                type: 'sqlite'
            },
            additionalConfiguration
        )

        const args = {
            sqliteOptions,
            tableName: tableName
        }

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Paste the value into jsonlint.com; fix reported positions.
  2. Use double-quoted keys and string values; drop trailing commas and comments.
  3. For SQLite you often only need {"journalMode":"WAL"} or similar - keep it minimal.
  4. Read the appended exception for the exact parse location.

Example fix

// before (invalid)
{ database: '/tmp/x.db', }
// after (valid)
{"database":"/tmp/x.db"}
Defensive patterns

Strategy: validation

Validate before calling

function parseAdditionalConfig(raw: string): Record<string, unknown> {
  try { return JSON.parse(raw) } catch (e) { throw new Error(`additionalConfig not valid JSON: ${(e as Error).message}`) }
}

Type guard

function isJsonString(s: unknown): s is string {
  if (typeof s !== 'string') return false
  try { JSON.parse(s); return true } catch { return false }
}

Try / catch

try {
  await sqliteManager.init(nodeData, input, options)
} catch (e) {
  if (e instanceof Error && e.message.startsWith('Invalid JSON in the Additional Configuration')) {
    // surface parse position to user
  }
  throw e
}

Prevention

When it happens

Trigger: User enters a JS object literal instead of JSON; trailing comma; single quotes; unquoted keys; comment lines; smart quotes from paste.

Common situations: Editing the Additional Configuration field by hand without a JSON validator; partial paste; copying from a TypeScript object literal.

Understand the failure class

Related errors


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