{"record":{"id":"9a86106d1fe95bbc","repo":"grpc/grpc-java","slug":"unsupported-input-type-typeurl","errorCode":null,"errorMessage":"Unsupported input type: ${typeUrl}","messagePattern":"Unsupported input type: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"xds/src/main/java/io/grpc/xds/internal/matcher/UnifiedMatcher.java","lineNumber":37,"sourceCode":"import com.github.xds.core.v3.TypedExtensionConfig;\nimport com.github.xds.type.matcher.v3.Matcher;\nimport java.util.function.Predicate;\nimport javax.annotation.Nullable;\n\n/**\n * Represents a compiled xDS Matcher.\n */\nabstract class UnifiedMatcher {\n\n  static final int MAX_RECURSION_DEPTH = 16;\n \n  abstract MatchResult match(MatchContext context);\n\n  static MatchInput resolveInput(TypedExtensionConfig config) {\n    String typeUrl = config.getTypedConfig().getTypeUrl();\n    MatchInputProvider provider = MatchInputRegistry.getDefaultRegistry().getProvider(typeUrl);\n    if (provider == null) {\n      throw new IllegalArgumentException(\"Unsupported input type: \" + typeUrl);\n    }\n    return provider.getInput(config);\n  }\n\n  /**\n   * Parses a proto Matcher into a UnifiedMatcher.\n   *\n   * @param proto the proto matcher\n   * @param actionValidator a predicate that returns true if the action type URL is supported\n   */\n  static UnifiedMatcher fromProto(Matcher proto,\n      Predicate<String> actionValidator) {\n    checkRecursionDepth(proto, 0);\n    Matcher.OnMatch onNoMatch = proto.hasOnNoMatch() ? proto.getOnNoMatch() : null;\n    if (proto.hasMatcherList()) {\n      return new MatcherList(proto.getMatcherList(), onNoMatch, actionValidator);\n    } else if (proto.hasMatcherTree()) {\n      return new MatcherTree(proto.getMatcherTree(), onNoMatch, actionValidator);","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/grpc/grpc-java/blob/64daddc1f3d1975670f769f3e97bde8b2ba32d25/xds/src/main/java/io/grpc/xds/internal/matcher/UnifiedMatcher.java#L19-L55","documentation":"resolveInput maps a TypedExtensionConfig to a MatchInput implementation via MatchInputRegistry. If no MatchInputProvider is registered for the config's type URL, the input extension is unknown to this runtime and it throws this IllegalArgumentException.","triggerScenarios":"Calling UnifiedMatcher.resolveInput with a TypedExtensionConfig whose typed config typeUrl has no provider in MatchInputRegistry.getDefaultRegistry() — e.g. an input extension type the gRPC version doesn't implement, a typo in '@type', or a custom input plugin that was never registered before matcher parsing.","commonSituations":"Envoy configs referencing input types (e.g. source IP, TLS fields) not yet ported to gRPC xDS; control-plane/client version skew; custom MatchInput extension not registered at startup; wrong type.googleapis.com URL casing or package name.","solutions":["Register a MatchInputProvider for the typeUrl in MatchInputRegistry.getDefaultRegistry() before parsing the matcher","Upgrade gRPC/xDS to a version that supports the requested input type","Replace the input with a supported input type in the config","Verify the '@type' URL exactly matches the registered provider key"],"exampleFix":"// before: unknown input typeUrl throws\nMatchInput input = UnifiedMatcher.resolveInput(config);\n// after: register the provider first\nMatchInputRegistry.getDefaultRegistry().register(\n    \"type.googleapis.com/grpc.xds.Input.MyHeaderInput\",\n    c -> new HeaderInput(c));\nMatchInput input = UnifiedMatcher.resolveInput(config);","handlingStrategy":"try-catch","validationCode":"String typeUrl = config.getTypedConfig().getTypeUrl();\nboolean supported = MatchInputRegistry.getDefaultRegistry().getProvider(typeUrl) != null;","typeGuard":null,"tryCatchPattern":"try { MatchInput in = UnifiedMatcher.resolveInput(cfg); } catch (IllegalArgumentException e) { log.error(\"Unsupported input \" + e.getMessage()); fallbackInput(); }","preventionTips":["Register all custom MatchInputProviders during initialization","Keep gRPC versions aligned with control-plane extensions","Verify '@type' URLs against the registry keys before deployment"],"tags":["xds","extension","custom-input","grpc"],"backgroundTag":"unsupported-operation","analyzedSha":"64daddc1f3d1975670f769f3e97bde8b2ba32d25","analyzedAt":"2026-09-08T06:14:57.704Z","contentChangedAt":"2026-09-08T06:14:57.704Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}