{"record":{"id":"fe157784a7962cd1","repo":"hashicorp/packer","slug":"post-processor-type-not-found-s","errorCode":null,"errorMessage":"post-processor type not found: %s","messagePattern":"post-processor type not found: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/core.go","lineNumber":559,"sourceCode":"\t\t\t\t\tstrings.Split(rawP.Type, \"-\")[0],\n\t\t\t\t)\n\n\t\t\t\tif sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.PostProcessors.List()); sugg != \"\" {\n\t\t\t\t\terr = fmt.Errorf(\"Did you mean to use %q?\", sugg)\n\t\t\t\t}\n\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\t// Get the post-processor\n\t\t\tpostProcessor, err := c.components.PluginConfig.PostProcessors.Start(rawP.Type)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\t\"error initializing post-processor '%s': %s\",\n\t\t\t\t\trawP.Type, err)\n\t\t\t}\n\t\t\tif postProcessor == nil {\n\t\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\t\"post-processor type not found: %s\", rawP.Type)\n\t\t\t}\n\n\t\t\tcurrent = append(current, CoreBuildPostProcessor{\n\t\t\t\tPostProcessor:     postProcessor,\n\t\t\t\tPType:             rawP.Type,\n\t\t\t\tPName:             rawP.Name,\n\t\t\t\tconfig:            rawP.Config,\n\t\t\t\tKeepInputArtifact: rawP.KeepInputArtifact,\n\t\t\t})\n\t\t}\n\n\t\t// If we have no post-processors in this chain, just continue.\n\t\tif len(current) == 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\tpostProcessors = append(postProcessors, current)","sourceCodeStart":541,"sourceCodeEnd":577,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/core.go#L541-L577","documentation":"Thrown by Core.Build at packer/core.go:559 as a defensive fallback: PostProcessors.Start returned no error but a nil postProcessor, meaning the type was listed but no actual plugin factory could be produced for it. This indicates an inconsistent PluginConfig (registered name with no runnable implementation).","triggerScenarios":"Core.Build reaches the `if postProcessor == nil` branch after Start succeeded — the plugin list contains the type but Start yields nil, e.g. a registry entry pointing at a plugin that exposes no post-processor factory.","commonSituations":"A plugin binary provides the name in its list but not a post-processor implementation (e.g. it only offers builders); a hand-crafted or corrupted PluginConfig; custom PluginConfig assembled in Go tests embedding a type that was never registered with a start function.","solutions":["Check which component types the plugin actually ships (`packer plugins installed` / plugin docs) and use the correct component name","Reinstall or upgrade the plugin binary","If assembling PluginConfig programmatically, register the post-processor with a non-nil start function instead of only listing its name"],"exampleFix":"// before: registered name without implementation\ncfg.PostProcessors = plugin.PostProcessorSet{names: [\"foo\"]}\n// after: register the start function too\ncfg.PostProcessors.Register(\"foo\", func() packer.PostProcessor { return &FooPP{} })","handlingStrategy":"type-guard","validationCode":"// before building, ensure the registered plugin exposes a post-processor factory\nif known := cfg.PostProcessors.Has(ppType); !known {\n    return fmt.Errorf(\"post-processor %q not registered\", ppType)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When constructing PluginConfig in Go, always pair the name with a non-nil start function","Only use plugins whose documented component types match what the template references","Reinstall plugins if the registry/binary pair looks inconsistent"],"tags":["packer","plugin","post-processor","internal"],"backgroundTag":"plugin-component-missing","analyzedSha":"eb36e3c3e48a036f3e8cc94087636ee72e1303c9","analyzedAt":"2026-09-05T13:20:43.127Z","contentChangedAt":"2026-09-05T13:20:43.127Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}