{"record":{"id":"3cec7602405e7ed3","repo":"crowdsecurity/crowdsec","slug":"no-parser-found-please-install-the-appropriate-pa","errorCode":null,"errorMessage":"no parser found. Please install the appropriate parser and retry","messagePattern":"no parser found\\. Please install the appropriate parser and retry","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/dumps/parser_dump.go","lineNumber":81,"sourceCode":"\n\t// Loop over stages to find last successful one with at least one parser\n\tfor i := len(stages) - 2; i >= 0; i-- {\n\t\tif len(pdump[stages[i]]) != 0 {\n\t\t\tlastStage = stages[i]\n\t\t\tbreak\n\t\t}\n\t}\n\n\tparsers := make([]string, 0, len(pdump[lastStage]))\n\n\tfor k := range pdump[lastStage] {\n\t\tparsers = append(parsers, k)\n\t}\n\n\tsort.Strings(parsers)\n\n\tif len(parsers) == 0 {\n\t\treturn nil, errors.New(\"no parser found. Please install the appropriate parser and retry\")\n\t}\n\n\tlastParser := parsers[len(parsers)-1]\n\n\tfor idx, result := range pdump[lastStage][lastParser] {\n\t\tif result.Evt.StrTime == \"\" {\n\t\t\tlogger.Warningf(\"Line %d/%d is missing evt.StrTime. It is most likely a mistake as it will prevent your logs to be processed in time-machine/forensic mode.\", idx, len(pdump[lastStage][lastParser]))\n\t\t} else {\n\t\t\tlogger.Debugf(\"Line %d/%d has evt.StrTime set to '%s'\", idx, len(pdump[lastStage][lastParser]), result.Evt.StrTime)\n\t\t}\n\t}\n\n\treturn &pdump, nil\n}\n\ntype tree struct {\n\t// note : we can use line -> time as the unique identifier (of acquisition)\n\tstate       map[time.Time]map[string]map[string]ParserResult","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/dumps/parser_dump.go#L63-L99","documentation":"LoadParserDump runs parser node tests from a parser dump file and needs at least one installed parser to select stages/parsers from. It returns this error when the collected parsers slice is empty, i.e. no parser is installed in the hub for the dump under test.","triggerScenarios":"Calling LoadParserDump when no parsers are installed (cscli hub update/install never run or hub data removed), so parsers list is empty after sorting.","commonSituations":"Running crowdsec or cscli test/dump on a fresh install without `cscli hub install` of collections; wiped hub directory; offline install missing parsers.","solutions":["Install parsers: cscli hub update && cscli collections install crowdsecurity/linux (or relevant collection)","Verify hub data with cscli hub list and cscli parsers list","Reinstall the hub data directory if it was deleted"],"exampleFix":"# before: empty hub\n$ cscli parsers list   # -> no entries\n# after\n$ cscli hub update\n$ cscli collections install crowdsecurity/linux","handlingStrategy":"validation","validationCode":"out, err := exec.Command(\"cscli\", \"parsers\", \"list\", \"-o\", \"json\").Output()\nif err != nil || strings.TrimSpace(string(out)) == \"\" || string(out) == \"[]\" {\n    return errors.New(\"install parsers via cscli hub install before dumping\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run cscli hub update && install a collection during provisioning","Verify parsers exist before running parser dumps/tests","Alert on empty hub directories in CI/test environments"],"tags":["hub","parser","crowdsec"],"backgroundTag":"missing-dependency","analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}