{"record":{"id":"c80a95a6448dbf08","repo":"hashicorp/packer","slug":"unknown-address-type-s","errorCode":null,"errorMessage":"Unknown address type: %s","messagePattern":"Unknown address type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/plugin_client.go","lineNumber":360,"sourceCode":"\t\t// Test the API versions\n\t\tif pluginMajorAPIVersion != pluginsdk.APIVersionMajor {\n\t\t\terr = fmt.Errorf(\"Incompatible API MAJOR version with plugin. \"+\n\t\t\t\t\"plugin MINOR API version: %s, Ours: %s\", pluginMajorAPIVersion, pluginsdk.APIVersionMajor)\n\t\t\treturn nil, err\n\t\t}\n\t\tif pluginMinorAPIVersion > pluginsdk.APIVersionMinor {\n\t\t\terr = fmt.Errorf(\"Incompatible API MINOR version with plugin. \"+\n\t\t\t\t\"plugin MINOR API version: %s, Ours: %s. Please upgrade Packer.\", pluginMinorAPIVersion, pluginsdk.APIVersionMinor)\n\t\t\treturn nil, err\n\t\t}\n\n\t\tswitch network {\n\t\tcase \"tcp\":\n\t\t\tc.address, err = net.ResolveTCPAddr(\"tcp\", netAddr)\n\t\tcase \"unix\":\n\t\t\tc.address, err = net.ResolveUnixAddr(\"unix\", netAddr)\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"Unknown address type: %s\", network)\n\t\t}\n\t\tlog.Printf(\"Received %s RPC address for %s: addr is %s\", network, cmd.Path, c.address)\n\t}\n\n\treturn c.address, err\n}\n\nfunc (c *PluginClient) logStderr(r io.Reader) {\n\tlogPrefix := filepath.Base(c.config.Cmd.Path)\n\tif logPrefix == \"packer\" {\n\t\t// we just called the normal packer binary with the plugin arg.\n\t\t// grab the last arg from the list which will match the plugin name.\n\t\tlogPrefix = c.config.Cmd.Args[len(c.config.Cmd.Args)-1]\n\t}\n\n\tbufR := bufio.NewReader(r)\n\tfor {\n\t\tline, err := bufR.ReadString('\\n')","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/plugin_client.go#L342-L378","documentation":"The handshake line's third field names the RPC network the plugin is listening on. Packer only knows how to resolve \"tcp\" and \"unix\" addresses; any other value is rejected with this error before an address can be resolved.","triggerScenarios":"Client.Start() in packer/plugin_client.go reaches the network switch with a network value other than \"tcp\" or \"unix\" — i.e. the plugin advertised an unsupported or malformed network type in its handshake line.","commonSituations":"A plugin built with a forked/nonstandard SDK that negotiates a different network type; a corrupted or garbled handshake line causing a bogus network field; hand-rolled plugin wrappers that print their own handshake format.","solutions":["Rebuild/reinstall the plugin with the official hashicorp/go-plugin and packer-plugin-sdk versions so it advertises tcp or unix.","Inspect the plugin's handshake output (run the binary directly) to see the malformed network field.","Use an official release of the plugin rather than a custom fork."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"out, _ := exec.Command(pluginPath, \"packer-plugin\").Output()\nparts := strings.Split(strings.TrimSpace(string(out)), \"|\")\nif len(parts) >= 3 && parts[2] != \"tcp\" && parts[2] != \"unix\" { /* unsupported network type */ }","typeGuard":null,"tryCatchPattern":"if _, err := client.Start(); err != nil {\n  if strings.Contains(err.Error(), \"Unknown address type\") {\n    // rebuild plugin with official go-plugin/SDK\n  }\n}","preventionTips":["Only use plugins built with the official hashicorp/go-plugin and packer-plugin-sdk.","Avoid forked SDKs that change the handshake format.","Verify handshake output manually when using custom-built plugins."],"tags":["plugin-protocol","network","handshake"],"backgroundTag":"plugin-protocol-incompatible","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"}