{"record":{"id":"4b08e29687ceed1d","repo":"hashicorp/packer","slug":"provisioner-failed-to-be-started-and-did-not-error","errorCode":null,"errorMessage":"provisioner failed to be started and did not error: %s","messagePattern":"provisioner failed to be started and did not error: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/core.go","lineNumber":262,"sourceCode":"\t\t\tstrings.Split(rawP.Type, \"-\")[0],\n\t\t)\n\n\t\tif sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Provisioners.List()); sugg != \"\" {\n\t\t\terr = fmt.Errorf(\"Did you mean to use %q?\", sugg)\n\t\t}\n\n\t\treturn cbp, err\n\t}\n\n\tprovisioner, err := c.components.PluginConfig.Provisioners.Start(rawP.Type)\n\tif err != nil {\n\t\treturn cbp, fmt.Errorf(\n\t\t\t\"error initializing provisioner '%s': %s\",\n\t\t\trawP.Type, err)\n\t}\n\t// Seems unlikely that a provisioner doesn't start successfully without error\n\tif provisioner == nil {\n\t\treturn cbp, fmt.Errorf(\n\t\t\t\"provisioner failed to be started and did not error: %s\", rawP.Type)\n\t}\n\n\treturn c.generateCoreBuildProvisionerWithProvisioner(rawP, rawName, provisioner)\n}\n\nfunc (c *Core) generateCoreBuildProvisionerWithProvisioner(rawP *template.Provisioner, rawName string, provisioner packersdk.Provisioner) (CoreBuildProvisioner, error) {\n\tcbp := CoreBuildProvisioner{}\n\n\t// Get the configuration\n\tconfig := make([]interface{}, 1, 2)\n\tconfig[0] = rawP.Config\n\tif rawP.Override != nil {\n\t\tif override, ok := rawP.Override[rawName]; ok {\n\t\t\tconfig = append(config, override)\n\t\t}\n\t}\n\t// If we're pausing, we wrap the provisioner in a special pauser.","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/core.go#L244-L280","documentation":"After starting the provisioner plugin, Packer got a nil provisioner back with no error — a state the code comments as 'seems unlikely'. Because Packer cannot proceed with a nil provisioner, it raises this defensive error naming the provisioner type.","triggerScenarios":"PluginConfig.Provisioners.Start(rawP.Type) returns (nil, nil). This indicates a plugin registry/builtins misconfiguration where the Start call silently yields no provisioner implementation. Raised from generateCoreBuildProvisioner during Core.Build.","commonSituations":"Custom or vendored plugin builds where a builtin is registered but its factory returns nil; internal plugin-wiring bugs rather than user template mistakes; broken plugin builds distributed with empty implementations.","solutions":["Check that the provisioner type is not shadowed by a misregistered custom plugin with the same name.","Reinstall/rebuild the plugin binary providing that provisioner type.","File a bug with plugin maintainers if a stock provisioner reproduces this (it indicates a Start() returning nil,nil defect).","As a workaround, verify plugin discovery with `packer plugins installed` and use an alternate provisioner type if available."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if _, err := core.Build(name); err != nil {\n    if strings.Contains(err.Error(), \"failed to be started and did not error\") {\n        // indicates plugin registry defect; report/log the provisioner type\n        return fmt.Errorf(\"broken plugin install for %s: reinstall\", pType)\n    }\n    return err\n}","preventionTips":["Use official plugin releases instead of locally patched builds.","Reinstall plugins if you override builtins with custom binaries.","Report nil-factory regressions to the plugin maintainers."],"tags":["provisioner","plugin","nil","internal"],"backgroundTag":"plugin-start-failed","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"}