FlowiseAI/Flowise · error · Error
Invalid base URL: must be a valid URL
Error message
Invalid base URL: must be a valid URL
What it means
The base URL must pass isValidURL, a security-hardened check: protocol must be http or https; hash fragments are rejected (they are an interpolation-exploit entry point); and the characters double-quote, single-quote, backtick, backslash, newline, carriage-return, and tab are rejected because the URL is later interpolated into JS. An empty, non-http, or fragment-bearing URL fails at init.
Source
Thrown at packages/components/nodes/sequentialagents/ExecuteFlow/ExecuteFlow.ts:180
typeof nodeData.inputs?.overrideConfig === 'string' &&
nodeData.inputs.overrideConfig.startsWith('{') &&
nodeData.inputs.overrideConfig.endsWith('}')
? JSON.parse(nodeData.inputs.overrideConfig)
: nodeData.inputs?.overrideConfig
if (!sequentialNodes || !sequentialNodes.length) throw new Error('Execute Flow must have a predecessor!')
const baseURL = (nodeData.inputs?.baseURL as string) || (options.baseURL as string)
const returnValueAs = nodeData.inputs?.returnValueAs as string
// Validate selectedFlowId is a valid UUID
if (!selectedFlowId || !isValidUUID(selectedFlowId)) {
throw new Error('Invalid flow ID: must be a valid UUID')
}
// Validate baseURL is a valid URL
if (!baseURL || !isValidURL(baseURL)) {
throw new Error('Invalid base URL: must be a valid URL')
}
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const chatflowApiKey = getCredentialParam('chatflowApiKey', credentialData, nodeData)
if (selectedFlowId === options.chatflowid) throw new Error('Cannot call the same agentflow!')
let headers = {}
if (chatflowApiKey) headers = { Authorization: `Bearer ${chatflowApiKey}` }
const chatflowId = options.chatflowid
const sessionId = options.sessionId
const chatId = options.chatId
const executeFunc = async (state: ISeqAgentsState) => {
const variables = await getVars(appDataSource, databaseEntities, nodeData, options)
let flowInput = ''View on GitHub (pinned to abe4a8601a)
Solutions
- Provide a full URL with scheme, e.g. http://localhost:3000 or https://flowise.example.com.
- Strip any '#fragment' from the URL.
- Remove any quotes, backslashes, or template-literal characters.
- If relying on the server default, ensure options.baseURL is configured on the Flowise instance.
Example fix
// before (throws: no scheme, has fragment) localhost:3000/api/v1/prediction/#main // after http://localhost:3000/api/v1/prediction/main
Defensive patterns
Strategy: validation
Validate before calling
import { isValidURL } from '../../../src/validator'
const baseURL = (nodeData.inputs?.baseURL as string) || (options.baseURL as string)
if (!baseURL || !isValidURL(baseURL)) throw new Error('baseURL must be an http(s) URL with no fragment or escape chars') Type guard
const isSafeHttpUrl = (u: string): boolean => {
try {
const p = new URL(u)
return (p.protocol === 'http:' || p.protocol === 'https:') && !p.hash && !/["'`\\\n\r\t]/.test(u)
} catch { return false }
} Prevention
- Always include the http:// or https:// scheme.
- Never append a '#fragment'; strip it before passing the URL.
- If relying on a server default, set options.baseURL in the Flowise config.
When it happens
Trigger: baseURL is empty (and options.baseURL is also unset); a scheme-less host like 'localhost:3000'; a URL containing a '#fragment'; a URL containing a quote or backslash from copy-paste; a non-http protocol (ftp:, file:).
Common situations: Running behind a reverse proxy and typing 'localhost:3000' without a scheme; leaving baseURL empty expecting a default that is not configured in options.baseURL; appending an anchor to the URL; copy-paste introducing stray quotes.
Related errors
- Execute Flow node name is required!
- Execute Flow must have a predecessor!
- Invalid flow ID: must be a valid UUID
- Cannot call the same agentflow!
- Invalid JSON in executeFlowOverrideConfig: ${parseError.mess
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/ba96d0c2132a0d67.
Report an issue: GitHub.