nektos/act · error
Too many parameters for %s expected <= %v got %v
Error message
Too many parameters for %s expected <= %v got %v
What it means
Validation error from checkSingleExpression in pkg/schema/schema.go when a function call in a ${{ }} expression passes more arguments than the function's declared maximum arity (e.g. contains max 2, join max 2, toJSON max 1).
Source
Thrown at pkg/schema/schema.go:148
case actionlint.TokenKindString:
return nil
default:
return fmt.Errorf("expressions are not allowed here")
}
}
funcs := s.GetFunctions()
var err error
actionlint.VisitExprNode(exprNode, func(node, _ actionlint.ExprNode, entering bool) {
if funcCallNode, ok := node.(*actionlint.FuncCallNode); entering && ok {
for _, v := range *funcs {
if strings.EqualFold(funcCallNode.Callee, v.name) {
if v.min > len(funcCallNode.Args) {
err = errors.Join(err, fmt.Errorf("Missing parameters for %s expected >= %v got %v", funcCallNode.Callee, v.min, len(funcCallNode.Args)))
}
if v.max < len(funcCallNode.Args) {
err = errors.Join(err, fmt.Errorf("Too many parameters for %s expected <= %v got %v", funcCallNode.Callee, v.max, len(funcCallNode.Args)))
}
return
}
}
err = errors.Join(err, fmt.Errorf("Unknown Function Call %s", funcCallNode.Callee))
}
if varNode, ok := node.(*actionlint.VariableNode); entering && ok {
for _, v := range s.Context {
if strings.EqualFold(varNode.Name, v) {
return
}
}
err = errors.Join(err, fmt.Errorf("Unknown Variable Access %s", varNode.Name))
}
})
return err
}
View on GitHub (pinned to 4f41128141)
Solutions
- Remove the extra argument(s) to fit the max arity in the GetFunctions table
- Split the logic into nested calls, e.g. contains(a,b) && contains(a,c) instead of a 3-arg contains
- Run schema validation / actionlint locally to catch arity errors pre-commit
Example fix
# before:
if: ${{ contains(github.event.head_commit.message, 'wip', 'draft') }}
# after:
if: ${{ contains(github.event.head_commit.message, 'wip') || contains(github.event.head_commit.message, 'draft') }} Defensive patterns
Strategy: validation
Validate before calling
// Same arity table as error 182: assert len(args) <= max for every function call in your expressions
Try / catch
Deterministic validation failure — fix and re-run; do not catch-and-continue.
Prevention
- Remember contains/startsWith/endsWith take exactly 2 args
- Nest calls instead of adding extra arguments
- Lint workflows in CI
When it happens
Trigger: Calling a known function with extra args: ${{ contains(a, b, c) }}, ${{ join(array, ',', 'x') }}. The check fires when v.max < len(funcCallNode.Args).
Common situations: Assuming variadic behavior where none exists (e.g. chaining format-like args into contains); porting shell-script idioms into expressions; copy-paste adding separators to join.
Related errors
- Missing parameters for %s expected >= %v got %v
- expressions are not allowed here
- Unknown Function Call %s
- Unknown Variable Access %s
- %sFailed to parse: %s
AI-assisted analysis of nektos/act@4f41128141 (2026-08-15).
Data as JSON: /api/errors/df51aff67dbbb6e4.
Report an issue: GitHub.