{"record":{"id":"7c3d4c1ad69bd9b8","repo":"hashicorp/packer","slug":"error-initializing-builder-s-s","errorCode":null,"errorMessage":"error initializing builder '%s': %s","messagePattern":"error initializing builder '(.+?)': (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/core.go","lineNumber":478,"sourceCode":"\t\t\t\"The builder %s is unknown by Packer, and is likely part of a plugin that is not installed.\\n\"+\n\t\t\t\t\"You may find the needed plugin along with installation instructions documented on the Packer integrations page.\\n\\n\"+\n\t\t\t\t\"https://developer.hashicorp.com/packer/integrations?filter=%s\",\n\t\t\tconfigBuilder.Type,\n\t\t\tstrings.Split(configBuilder.Type, \"-\")[0],\n\t\t)\n\n\t\tif sugg := didyoumean.NameSuggestion(configBuilder.Type, c.components.PluginConfig.Builders.List()); sugg != \"\" {\n\t\t\terr = fmt.Errorf(\"Did you mean to use %q?\", sugg)\n\t\t}\n\n\t\treturn nil, err\n\t}\n\n\t// the Start command launches the builder plugin of the given type without\n\t// calling Prepare() or passing any build-specific details.\n\tbuilder, err := c.components.PluginConfig.Builders.Start(configBuilder.Type)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"error initializing builder '%s': %s\",\n\t\t\tconfigBuilder.Type, err)\n\t}\n\tif builder == nil {\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"builder type not found: %s\", configBuilder.Type)\n\t}\n\n\t// rawName is the uninterpolated name that we use for various lookups\n\trawName := configBuilder.Name\n\n\t// Setup the provisioners for this build\n\tprovisioners := make([]CoreBuildProvisioner, 0, len(c.Template.Provisioners))\n\tfor _, rawP := range c.Template.Provisioners {\n\t\t// If we're skipping this, then ignore it\n\t\tif rawP.OnlyExcept.Skip(rawName) {\n\t\t\tcontinue\n\t\t}","sourceCodeStart":460,"sourceCodeEnd":496,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/core.go#L460-L496","documentation":"The builder plugin type was found and Packer launched it via Builders.Start, but the plugin process failed to start or errored during startup/handshake. Packer wraps the underlying error with the builder type.","triggerScenarios":"Core.Build: c.components.PluginConfig.Builders.Start(configBuilder.Type) returns a non-nil error — plugin binary missing/corrupt despite registry entry, exec failure, crash on startup, or incompatible plugin protocol version. Raised during `packer build`.","commonSituations":"Plugin built against an older SDK incompatible with the current Packer core; broken install left a stale binary; plugin panics at init; filesystem permissions preventing exec; disk full preventing plugin launch.","solutions":["Inspect the wrapped inner error; reinstall the plugin (`packer plugins install <source>`) to replace a corrupt binary.","Upgrade the plugin to a version compatible with your Packer release.","Verify the binary runs standalone from the plugin directory.","Check disk space and file permissions in the plugin path."],"exampleFix":"# before\n$ packer build .\n# error initializing builder 'amazon-ebs': ...\n# after\n$ packer init .\n$ packer plugins install github.com/hashicorp/amazon\n$ packer build .","handlingStrategy":"try-catch","validationCode":"// Smoke-test plugin executability before the build:\nout, err := exec.Command(\"packer\", \"plugins\", \"installed\").Output()","typeGuard":null,"tryCatchPattern":"if _, err := core.Build(n); err != nil {\n    if strings.Contains(err.Error(), \"error initializing builder\") {\n        // reinstall the plugin, then retry the build once\n        exec.Command(\"packer\", \"plugins\", \"install\", pluginSource).Run()\n        if _, retryErr := core.Build(n); retryErr != nil {\n            return retryErr\n        }\n        return nil\n    }\n    return err\n}","preventionTips":["Pin plugin versions compatible with the Packer core in required_plugins.","Run `packer init` before every build in fresh environments.","Keep the plugin cache writable and with sufficient disk space.","Test builder plugin upgrades in an isolated plugin path first."],"tags":["builder","plugin","initialization","plugin-crash"],"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"}