{"record":{"id":"3800e7eb0554835b","repo":"grpc/grpc-go","slug":"extproc-failed-to-parse-grpc-service-v","errorCode":null,"errorMessage":"extproc: failed to parse grpc_service %v","messagePattern":"extproc: failed to parse grpc_service (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/xds/httpfilter/extproc/ext_proc.go","lineNumber":130,"sourceCode":"\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 {\n\t\treturn nil, err\n\t}\n\n\tvar allowedHeaders, disallowedHeaders []matcher.StringMatcher\n\tif allowed := msg.GetForwardRules().GetAllowedHeaders(); allowed != nil {\n\t\tallowedHeaders, err = httpfilter.ConvertStringMatchers(allowed.GetPatterns())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tif disallowed := msg.GetForwardRules().GetDisallowedHeaders(); disallowed != nil {\n\t\tdisallowedHeaders, err = httpfilter.ConvertStringMatchers(disallowed.GetPatterns())\n\t\tif err != nil {","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/grpc/grpc-go/blob/03255a9237b6eb32710f6bc4f2de9a675b99fe36/internal/xds/httpfilter/extproc/ext_proc.go#L112-L148","documentation":"Raised by ParseFilterConfig (ext_proc.go:130) when iextproc.ParseGRPCServiceConfig rejects the supplied grpc_service proto. Unlike ext_authz (where the parser is currently a stub), the ext_proc parser is injectable (internal/internal.go:42) and in the real build validates the GrpcService; it fails for unsupported specifiers (e.g. envoy_grpc), empty target_uri, or credential JSON it cannot parse.","triggerScenarios":"msg.GetGrpcService() is non-nil but iextproc.ParseGRPCServiceConfig at ext_proc.go:128 returns a non-nil error — e.g. envoy_grpc used instead of google_grpc, an empty target_uri, or malformed channel/call credentials JSON.","commonSituations":"Control plane emits grpc_service.envoy_grpc (cluster-based) which the gRPC-side parser rejects; google_grpc.target_uri is blank; credentials JSON is malformed or references an unsupported plugin.","solutions":["Use google_grpc (GrpcService_GoogleGrpc) rather than envoy_grpc for the ext_proc grpc_service.","Set a non-empty, dialable target_uri on google_grpc.","Validate any channel_credentials/call_credentials JSON the parser must consume; simplify to insecure/plain creds to isolate the cause.","Re-apply and confirm ACK."],"exampleFix":"// before: envoy_grpc is not parseable\n//   grpc_service: { envoy_grpc: { cluster_name: \"ext-proc\" } }\n//\n// after: google_grpc with a concrete target\n//   grpc_service: { google_grpc: { target_uri: \"dns:///ext-proc.ns:9092\" } }","handlingStrategy":"validation","validationCode":"// Pre-validate the ext_proc grpc_service like the injected parser does\n// (internal/internal.go:42, called at ext_proc.go:128).\nfunc validateExtProcGrpcService(gs *v3corepb.GrpcService) error {\n    if gs == nil {\n        return fmt.Errorf(\"grpc_service is nil\")\n    }\n    if gs.GetGoogleGrpc() == nil {\n        return fmt.Errorf(\"expected non-nil GoogleGrpc\")\n    }\n    if gs.GetGoogleGrpc().GetTargetUri() == \"\" {\n        return fmt.Errorf(\"empty target_uri in GoogleGrpc\")\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use google_grpc with a non-empty target_uri for ext_proc grpc_service.","Avoid envoy_grpc/cluster-based services in xDS consumed by gRPC clients.","Validate credentials JSON before publishing; simplify to plain creds to isolate parse failures."],"tags":["grpc","xds","config","ext-proc","grpc-service"],"analyzedSha":"03255a9237b6eb32710f6bc4f2de9a675b99fe36","analyzedAt":"2026-08-07T00:29:34.215Z","schemaVersion":2},"datasetVersion":"2026-08-07T03:17:09.362Z"}