{"record":{"id":"ff3e15a422b5eeaa","repo":"grpc/grpc-go","slug":"extproc-failed-to-parse-grpc-service-v-ff3e15","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":196,"sourceCode":"\tmsg := new(v3procfilterpb.ExtProcPerRoute)\n\tif err := m.UnmarshalTo(msg); err != nil {\n\t\treturn nil, fmt.Errorf(\"extproc: failed to unmarshal override %v: %v\", ov, err)\n\t}\n\toverride := msg.GetOverrides()\n\n\tvar processingModesOpt optional.Optional[processingModes]\n\tif pm := override.GetProcessingMode(); pm != nil {\n\t\tif err := validateBodyProcessingMode(pm); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tprocessingModesOpt = optional.New(processingModesFromProto(pm))\n\t}\n\n\tvar serverOpt optional.Optional[xdsresource.GRPCServiceConfig]\n\tif override.GetGrpcService() != nil {\n\t\tserver, err := iextproc.ParseGRPCServiceConfig(override.GetGrpcService())\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"extproc: failed to parse grpc_service: %v\", err)\n\t\t}\n\t\tserverOpt = optional.New(server)\n\t}\n\n\tvar failureModeAllowOpt optional.Optional[bool]\n\tif override.GetFailureModeAllow() != nil {\n\t\tfailureModeAllowOpt = optional.New(override.GetFailureModeAllow().GetValue())\n\t}\n\n\treturn overrideConfig{\n\t\tserver:             serverOpt,\n\t\tprocessingModes:    processingModesOpt,\n\t\tfailureModeAllow:   failureModeAllowOpt,\n\t\trequestAttributes:  override.GetRequestAttributes(),\n\t\tresponseAttributes: override.GetResponseAttributes(),\n\t}, nil\n}\n","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/grpc/grpc-go/blob/03255a9237b6eb32710f6bc4f2de9a675b99fe36/internal/xds/httpfilter/extproc/ext_proc.go#L178-L214","documentation":"Raised by ParseFilterConfigOverride when the per-route override declares a grpc_service but iextproc.ParseGRPCServiceConfig rejects it. The GrpcService sub-message is structurally invalid or references a target the resolver cannot make sense of, so the override's custom server cannot be used.","triggerScenarios":"ExtProcPerRoute.overrides.grpc_service is set but malformed — missing both envoy_grpc and google_grpc, an unparseable target_uri, or a google_grpc with an invalid stat_prefix/config. ParseGRPCServiceConfig returns a non-nil error which is wrapped here.","commonSituations":"Operator adds a per-route override pointing the filter at a different ext-proc server but forgets the target_uri or uses a malformed URI scheme. A typo in the grpc_service protobuf. The xdsclient's GrpcService parser rejecting a google_grpc sub-field after a library upgrade.","solutions":["Inspect the wrapped error from ParseGRPCServiceConfig (it is printed via %v) to see exactly which GrpcService field is rejected.","Provide a complete grpc_service with either envoy_grpc.target_uri or google_grpc.target_uri set to a resolvable authority (e.g. dns:///ext-proc.ns:8080).","If using a per-route server, validate the same GrpcService payload in the control plane before publishing the LDS resource."],"exampleFix":"// before: override grpc_service has empty target\noverrides:\n  grpc_service:\n    envoy_grpc: {}\n\n// after\noverrides:\n  grpc_service:\n    envoy_grpc:\n      cluster_name: ext_proc_cluster","handlingStrategy":"validation","validationCode":"// Sanity-check the grpc_service before publishing / before trusting an override.\nfunc validateGrpcService(gs *v3corepb.GrpcService) error {\n    if gs == nil { return fmt.Errorf(\"grpc_service is nil\") }\n    if eg := gs.GetEnvoyGrpc(); eg != nil && eg.GetClusterName() == \"\" {\n        return fmt.Errorf(\"envoy_grpc.cluster_name is empty\")\n    }\n    if gg := gs.GetGoogleGrpc(); gg != nil && gg.GetTargetUri() == \"\" {\n        return fmt.Errorf(\"google_grpc.target_uri is empty\")\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set either envoy_grpc.cluster_name or google_grpc.target_uri on grpc_service.","Reconcile the ext_proc cluster in CDS so the override's grpc_service resolves."],"tags":["extproc","xds","config-parsing","grpc-service","per-route"],"analyzedSha":"03255a9237b6eb32710f6bc4f2de9a675b99fe36","analyzedAt":"2026-08-07T00:29:34.215Z","schemaVersion":2},"datasetVersion":"2026-08-07T03:17:09.362Z"}