{"record":{"id":"51e018bec79beeba","repo":"hashicorp/terraform","slug":"no-supported-plugins-for-protocol-0","errorCode":null,"errorMessage":"no supported plugins for protocol 0","messagePattern":"no supported plugins for protocol 0","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/command/meta_providers.go","lineNumber":548,"sourceCode":"\t\t\tHandshakeConfig:  tfplugin.Handshake,\n\t\t\tLogger:           logging.NewProviderLogger(\"unmanaged.\"),\n\t\t\tAllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC},\n\t\t\tManaged:          false,\n\t\t\tReattach:         reattach,\n\t\t\tSyncStdout:       logging.PluginOutputMonitor(fmt.Sprintf(\"%s:stdout\", provider)),\n\t\t\tSyncStderr:       logging.PluginOutputMonitor(fmt.Sprintf(\"%s:stderr\", provider)),\n\t\t}\n\n\t\tif reattach.ProtocolVersion == 0 {\n\t\t\t// As of the 0.15 release, sdk.v2 doesn't include the protocol\n\t\t\t// version in the ReattachConfig (only recently added to\n\t\t\t// go-plugin), so client.NegotiatedVersion() always returns 0. We\n\t\t\t// assume that an unmanaged provider reporting protocol version 0 is\n\t\t\t// actually using proto v5 for backwards compatibility.\n\t\t\tif defaultPlugins, ok := tfplugin.VersionedPlugins[5]; ok {\n\t\t\t\tconfig.Plugins = defaultPlugins\n\t\t\t} else {\n\t\t\t\treturn nil, errors.New(\"no supported plugins for protocol 0\")\n\t\t\t}\n\t\t} else if plugins, ok := tfplugin.VersionedPlugins[reattach.ProtocolVersion]; !ok {\n\t\t\treturn nil, fmt.Errorf(\"no supported plugins for protocol %d\", reattach.ProtocolVersion)\n\t\t} else {\n\t\t\tconfig.Plugins = plugins\n\t\t}\n\n\t\tclient := plugin.NewClient(config)\n\t\trpcClient, err := client.Client()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\traw, err := rpcClient.Dispense(tfplugin.ProviderPluginName)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/hashicorp/terraform/blob/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/command/meta_providers.go#L530-L566","documentation":"Returned while building a provider client for a **development reattach** configuration (`-reattach`/`TF_REATTACH_PROVIDERS`) when the reattach config reports protocol version 0 AND the build's `tfplugin.VersionedPlugins` map has no entry for version 5. Normally Terraform assumes an unmanaged v0 protocol is really proto v5, but this build lacks the v5 plugin set, so it cannot serve the provider.","triggerScenarios":"`config.Plugins` lookup falls into the `reattach.ProtocolVersion == 0` branch and `tfplugin.VersionedPlugins[5]` is absent (ok == false) in this compiled Terraform binary.","commonSituations":"Using an outdated or custom-built Terraform binary to reattach to an SDK v2 provider whose ReattachConfig omits the negotiated version; mixing a very old `tfplugin` dependency set with a newer provider dev workflow.","solutions":["Use a current official Terraform release whose `VersionedPlugins` includes v5 when reattaching to SDK v2 providers.","Ensure the provider's ReattachConfig sets `ProtocolVersion` (5 or 6) instead of leaving it 0.","Rebuild/re-install the provider via `go install` so the reattach info reflects the negotiated protocol."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// When building a reattach client, validate the protocol map up front:\nif reattach.ProtocolVersion == 0 {\n    if _, ok := tfplugin.VersionedPlugins[5]; !ok {\n        return nil, fmt.Errorf(\"this build has no v5 plugins; cannot reattach to SDK v2 provider %q\", reattach.PluginName)\n    }\n}","typeGuard":"// hasProto5 reports whether the running binary can serve a v5 provider.\nfunc hasProto5() bool {\n    _, ok := tfplugin.VersionedPlugins[5]\n    return ok\n}","tryCatchPattern":null,"preventionTips":["Use official Terraform releases for provider dev reattach workflows.","Have provider dev tooling emit the negotiated ProtocolVersion in ReattachConfig.","Pin Terraform and provider versions together in dev environments."],"tags":["provider","reattach","plugin-protocol","dev-workflow","version-mismatch"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}