FlowiseAI/Flowise · error · Error
No valid filter methods found
Error message
No valid filter methods found
What it means
After tokenizing, if the parsed chain is empty the parser throws 'No valid filter methods found'. This means no method call matched the method pattern, so there is nothing safe to apply to the RPC. It guards against no-op filter strings being turned into a pass-through function.
Source
Thrown at packages/components/nodes/vectorstores/Supabase/filterParser.ts:96
throw new Error(`Disallowed method: ${method}`)
}
// Parse arguments safely
const args = this.parseArguments(argsString)
// Additional validation for filter method
if (method === 'filter' && args.length >= 2) {
const operator = args[1]
if (typeof operator === 'string' && !this.ALLOWED_OPERATORS.includes(operator)) {
throw new Error(`Disallowed filter operator: ${operator}`)
}
}
chain.push({ method, args })
}
if (chain.length === 0) {
throw new Error('No valid filter methods found')
}
return chain
}
private static parseArguments(argsString: string): any[] {
if (!argsString.trim()) {
return []
}
const args: any[] = []
let current = ''
let inString = false
let stringChar = ''
let depth = 0
for (let i = 0; i < argsString.length; i++) {
const char = argsString[i]View on GitHub (pinned to abe4a8601a)
Solutions
- Provide at least one allowed method call, e.g. `filter("col","eq",value)`.
- If an empty filter is valid for your flow, short-circuit before calling parseFilterString (skip filtering).
- Strip comments/semicolons and confirm the remaining string contains a method call.
- Validate non-empty after cleaning before parsing.
Example fix
// before: parseFilterString('') -> No valid filter methods found
// after: if (!raw.trim()) return (rpc) => rpc // treat empty as no-op Defensive patterns
Strategy: validation
Validate before calling
function ensureNonEmptyFilter(raw: string): string {
const cleaned = raw.replace(/\/\/.*$/gm,'').replace(/\/\*[\s\S]*?\*\//g,'').replace(/\s+/g,' ').trim().replace(/;$/,'').trim()
if (!cleaned || !/\.?\w+\s*\(/.test(cleaned)) throw new Error('Filter must contain at least one method call')
return cleaned
} Type guard
function hasMethodCall(s: string): boolean { return /\.?\w+\s*\([^)]*\)/.test(s) } Try / catch
null
Prevention
- Short-circuit empty filter strings to a no-op before parsing.
- Require at least one method call in the editor.
- Strip comments/semicolons before checking emptiness.
- Provide a filter template so users start from a valid example.
When it happens
Trigger: Empty or whitespace-only filter string; a string with only comments; a string that is just a literal/number with no `.method(...)` calls; malformed syntax the regex cannot tokenize (e.g. missing parentheses).
Common situations: Empty chatflow input submitted as a filter; user enters just a column name or raw SQL with no method chain; trailing content after a cleaned comment leaves no callable.
Related errors
- Failed to parse Supabase filter: ${error.message}
- Failed to call ${method}: ${error.message}
- Disallowed method: ${method}
- Disallowed filter operator: ${operator}
- Potentially dangerous argument: ${arg}
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/8afbaa07a5a36692.
Report an issue: GitHub.