crowdsecurity/crowdsec · error
failed to check version : %s
Error message
failed to check version : %s
What it means
Wraps an error from evaluating the parser format-version constraint (constraint.Satisfies) for a node in processStageFile. This is not 'version unsupported' (that path is logged and skipped) — it means the version string itself could not be checked, e.g. constraint parsing or comparison failed internally.
Source
Thrown at pkg/parser/stage.go:124
return nil, fmt.Errorf("error decoding parsing configuration file '%s': %v", stageFile.Filename, err)
}
// check for empty bucket
if node.Name == "" && node.Description == "" && node.Author == "" {
log.Infof("Node in %s has no name, author or description. Skipping.", stageFile.Filename)
continue
}
// check compat
if node.FormatVersion == "" {
log.Tracef("no version in %s, assuming '1.0'", node.Name)
node.FormatVersion = "1.0"
}
ok, err := constraint.Satisfies(node.FormatVersion, constraint.Parser)
if err != nil {
return nil, fmt.Errorf("failed to check version : %s", err)
}
if !ok {
log.Errorf("%s : %s doesn't satisfy parser format %s, skip", node.Name, node.FormatVersion, constraint.Parser)
continue
}
node.Stage = stageFile.Stage
// compile the node : grok pattern and expression
err = node.compile(pctx, ectx)
if err != nil {
if node.Name != "" {
return nil, fmt.Errorf("failed to compile node '%s' in '%s' : %s", node.Name, stageFile.Filename, err)
}
return nil, fmt.Errorf("failed to compile node in '%s' : %s", stageFile.Filename, err)
}View on GitHub (pinned to 909b515798)
Solutions
- Set a plain valid format_version in the parser YAML (e.g. "1.0")
- Check node.FormatVersion in the file — remove exotic values like 'v1.0'
- If the version looks fine, report/inspect constraint.Satisfies — the failure is in the checker itself
- Upgrade CrowdSec so the version-constraint library matches the hub expectations
Example fix
# before format_version: v1.0 # after format_version: 1.0
Defensive patterns
Strategy: validation
Validate before calling
v := strings.TrimPrefix(strings.TrimSpace(node.FormatVersion), "v")
if v == "" { v = "1.0" }
// only plain x.y / x.y.z values are known-good
if !regexp.MustCompile(`^\d+(\.\d+){0,2}$`).MatchString(v) {
return fmt.Errorf("unsupported format_version %q", node.FormatVersion)
} Try / catch
if _, err := constraint.Satisfies(node.FormatVersion, constraint.Parser); err != nil {
log.Warnf("bad version in %s: %v", node.Name, err)
} Prevention
- Always use plain numeric format_version values (e.g. "1.0")
- Rely on the loader's defaulting rather than inventing version strings
- Upgrade CrowdSec if the constraint checker itself errors
When it happens
Trigger: Calling processStageFile (via LoadStages) when constraint.Satisfies(node.FormatVersion, constraint.Parser) returns err — malformed internal constraint or an unparsable FormatVersion reaching the checker despite the earlier defaulting to '1.0'.
Common situations: A parser file with a FormatVersion value that slips past the defaulting logic (non-empty but invalid), a corrupted constraint.Parser constant from a bad build, unusual version strings like 'v1.0' or '1.0.0-beta' that the checker cannot compare.
Related errors
- unable to find grok %q: %v
- onsuccess %q not continue,next_stage
- stash %d: %w
- failed to stat %s : %v
- can't access parsing configuration file %s : %s
AI-assisted analysis of crowdsecurity/crowdsec@909b515798 (2026-09-06).
Data as JSON: /api/errors/2aaa213d5787b3da.
Report an issue: GitHub.