projectdiscovery/nuclei · error
Invalid action type: %s
Error message
Invalid action type: %s
What it means
Headless engine action names in YAML are resolved by toActionTypes, which trims and lowercases the value then matches it against the ActionType enum table. Any name not in ActionToActionString fails template compilation with this error. Valid names include navigate, script, click, rightclick, text, screenshot, time, select, files, waitdom, waitfcp, waitfmp, waitidle, waitload, waitstable, getresource, extract, setmethod, addheader, setheader, deleteheader, setbody, waitevent, waitdialog and more.
Source
Thrown at pkg/protocols/headless/engine/action_types.go:189
}
// GetSupportedActionTypes returns list of supported types
func GetSupportedActionTypes() []ActionType {
var result []ActionType
for index := ActionType(1); index < limit; index++ {
result = append(result, index)
}
return result
}
func toActionTypes(valueToMap string) (ActionType, error) {
normalizedValue := normalizeValue(valueToMap)
for key, currentValue := range ActionToActionString {
if normalizedValue == currentValue {
return key, nil
}
}
return -1, errors.New("Invalid action type: " + valueToMap)
}
func normalizeValue(value string) string {
return strings.TrimSpace(strings.ToLower(value))
}
func (t ActionType) String() string {
return ActionToActionString[t]
}
// ActionTypeHolder is used to hold internal type of the action
type ActionTypeHolder struct {
ActionType ActionType `mapping:"true"`
}
func (holder ActionTypeHolder) String() string {
return holder.ActionType.String()
}View on GitHub (pinned to 265b3a3dec)
Solutions
- Correct the action name to a supported one from the headless action list (see nuclei docs 'headless-actions')
- Run `nuclei -t tpl.yaml -validate` to catch the typo at validation time
- If the action exists in current nuclei but not in yours, upgrade nuclei (go install / release binary)
Example fix
# before
steps:
- action: navigte
url: '{{BaseURL}}'
# after
steps:
- action: navigate
url: '{{BaseURL}}' Defensive patterns
Strategy: type-guard
Type guard
var supportedActions = map[string]bool{
"navigate": true, "script": true, "click": true, "rightclick": true,
"text": true, "screenshot": true, "time": true, "select": true,
"files": true, "waitdom": true, "waitfcp": true, "waitfmp": true,
"waitidle": true, "waitload": true, "waitstable": true, "getresource": true,
"extract": true, "setmethod": true, "addheader": true, "setheader": true,
"deleteheader": true, "setbody": true, "waitevent": true, "waitdialog": true,
"clickandwait": true, "sleep": true, "waitfor": true, "scrollto": true,
}
func isValidAction(name string) bool {
return supportedActions[strings.ToLower(strings.TrimSpace(name))]
} Prevention
- Validate headless templates with nuclei -validate before deployment
- Write action names from the official headless-actions docs, not from Playwright/Puppeteer vocabulary
- After upgrading nuclei, re-validate older templates that use recently added actions on new names
When it happens
Trigger: A headless template step with a misspelled or unsupported action name, e.g. `action: navigte`, or a Playwright/Puppeteer-style verb like `action: hover` that nuclei does not implement.
Common situations: Typos when hand-writing headless templates; porting automation scripts from other browser tools and assuming the same action vocabulary; using newer action names (waitstable, setmethod) on an older nuclei version that predates them.
Related errors
- validation failed for these fields
- Invalid severity: %s
- Invalid extractor type: %s
- Invalid matcher type: %s
- Invalid DNS request type: %s
AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15).
Data as JSON: /api/errors/910b96a36cc14bb8.
Report an issue: GitHub.