{"record":{"id":"b7495d130a375bc2","repo":"grpc/grpc-go","slug":"extproc-failed-to-unmarshal-config-v-v","errorCode":null,"errorMessage":"extproc: failed to unmarshal config %v: %v","messagePattern":"extproc: failed to unmarshal config (.+?): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/httpfilter/extproc/ext_proc.go","lineNumber":116,"sourceCode":"\t\treturn fmt.Errorf(\"extproc: invalid request body mode %v: want %q or %q\", m, \"NONE\", \"GRPC\")\n\t}\n\tif m := mode.GetResponseBodyMode(); m != v3procfilterpb.ProcessingMode_NONE && m != v3procfilterpb.ProcessingMode_GRPC {\n\t\treturn fmt.Errorf(\"extproc: invalid response body mode %v: want %q or %q\", m, \"NONE\", \"GRPC\")\n\t}\n\tif mode.GetResponseBodyMode() == v3procfilterpb.ProcessingMode_GRPC && mode.GetResponseTrailerMode() != v3procfilterpb.ProcessingMode_SEND {\n\t\treturn fmt.Errorf(\"extproc: invalid response trailer mode %v: must be %q when response body mode is %q\", mode.GetResponseTrailerMode(), \"SEND\", \"GRPC\")\n\t}\n\treturn nil\n}\n\nfunc (builder) ParseFilterConfig(cfg proto.Message) (httpfilter.FilterConfig, error) {\n\tm, ok := cfg.(*anypb.Any)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"extproc: error parsing config %v: unknown type %T, want *anypb.Any\", cfg, cfg)\n\t}\n\tmsg := new(v3procfilterpb.ExternalProcessor)\n\tif err := m.UnmarshalTo(msg); err != nil {\n\t\treturn nil, fmt.Errorf(\"extproc: failed to unmarshal config %v: %v\", cfg, err)\n\t}\n\tif msg.GetProcessingMode() == nil {\n\t\treturn nil, fmt.Errorf(\"extproc: missing processing_mode in config %v\", cfg)\n\t}\n\tif err := validateBodyProcessingMode(msg.GetProcessingMode()); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif msg.GetGrpcService() == nil {\n\t\treturn nil, fmt.Errorf(\"extproc: empty grpc_service provided in config %v\", cfg)\n\t}\n\tserver, err := iextproc.ParseGRPCServiceConfig(msg.GetGrpcService())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"extproc: failed to parse grpc_service %v\", err)\n\t}\n\n\tmutationRules, err := httpfilter.HeaderMutationRulesFromProto(msg.GetMutationRules())\n\tif err != nil {","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/grpc/grpc-go/blob/0c51461d27177d997e14c642fe18c11668fc09a3/internal/xds/httpfilter/extproc/ext_proc.go#L98-L134","documentation":"Returned by ParseFilterConfig when anypb.Any.UnmarshalTo fails to decode the packed bytes into an ExternalProcessor message. Usually the type_url does not match ExternalProcessor's full name, the bytes are corrupted, or the proto schema versions between control plane and client are incompatible. Hit at ext_proc.go:115.","triggerScenarios":"The xDS resource delivers an *anypb.Any whose type_url is not type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor, or whose value bytes are malformed / from a newer proto revision with unknown fields that UnmarshalTo rejects.","commonSituations":"Control plane and grpc-go use different versions of go-control-plane with incompatible ext_proc protos; type URL typo in the control plane; resource corrupted in transit or by a buggy serializer; wrong filter is wired to the ext_proc type URL.","solutions":["Verify the Any.type_url matches the builder's advertised TypeURL (see TypeURLs() in ext_proc.go:86).","Align the go-control-plane version between the control plane and grpc-go client.","Re-serialize the resource from a known-good ExternalProcessor message.","Check the server logs / xDS dump (e.g. via xds-resolver debugging) for the raw bytes and validate them standalone."],"exampleFix":"// control plane - before\nany, _ := anypb.New(otherFilterMsg)\n// after: ensure correct type and version\nany, _ := anypb.New(&v3extproc.ExternalProcessor{...})\n// confirm any.TypeUrl == \"type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor\"","handlingStrategy":"validation","validationCode":"// verify type URL and decodability before sending\nwant := \"type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor\"\nif any.TypeUrl != want { return fmt.Errorf(\"wrong type_url %q\", any.TypeUrl) }\nprobe := new(v3extproc.ExternalProcessor)\nif err := any.UnmarshalTo(probe); err != nil { return err }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match go-control-plane versions between control plane and client.","Verify the Any.type_url equals the builder's TypeURL.","Re-serialize resources from known-good messages.","Use the xDS debug dump to inspect raw bytes."],"tags":["grpc","xds","extproc","config","protobuf"],"backgroundTag":null,"analyzedSha":"0c51461d27177d997e14c642fe18c11668fc09a3","analyzedAt":"2026-08-11T14:49:15.055Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}