grpc/grpc-java · error · IllegalArgumentException
Unsupported input type
Error message
Unsupported input type: ${typeUrl} What it means
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.
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
Example fix
// before: unknown input typeUrl throws
MatchInput input = UnifiedMatcher.resolveInput(config);
// after: register the provider first
MatchInputRegistry.getDefaultRegistry().register(
"type.googleapis.com/grpc.xds.Input.MyHeaderInput",
c -> new HeaderInput(c));
MatchInput input = UnifiedMatcher.resolveInput(config); Defensive patterns
Strategy: try-catch
Validate before calling
String typeUrl = config.getTypedConfig().getTypeUrl(); boolean supported = MatchInputRegistry.getDefaultRegistry().getProvider(typeUrl) != null;
Try / catch
try { MatchInput in = UnifiedMatcher.resolveInput(cfg); } catch (IllegalArgumentException e) { log.error("Unsupported input " + e.getMessage()); fallbackInput(); } Prevention
- Register all custom MatchInputProviders during initialization
- Keep gRPC versions aligned with control-plane extensions
- Verify '@type' URLs against the registry keys before deployment
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Unsupported custom_match matcher
- A terminal HttpFilter must be the last filter
- Address is not an IP
- All xds transports for authority are in backoff
- AndMatcher must have at least 2 predicates
AI-assisted analysis of grpc/grpc-java@64daddc1f3 (2026-09-08).
Data as JSON: /api/errors/9a86106d1fe95bbc.
Report an issue: GitHub.
Appendix: source
Thrown at xds/src/main/java/io/grpc/xds/internal/matcher/UnifiedMatcher.java:37
import com.github.xds.core.v3.TypedExtensionConfig;
import com.github.xds.type.matcher.v3.Matcher;
import java.util.function.Predicate;
import javax.annotation.Nullable;
/**
* Represents a compiled xDS Matcher.
*/
abstract class UnifiedMatcher {
static final int MAX_RECURSION_DEPTH = 16;
abstract MatchResult match(MatchContext context);
static MatchInput resolveInput(TypedExtensionConfig config) {
String typeUrl = config.getTypedConfig().getTypeUrl();
MatchInputProvider provider = MatchInputRegistry.getDefaultRegistry().getProvider(typeUrl);
if (provider == null) {
throw new IllegalArgumentException("Unsupported input type: " + typeUrl);
}
return provider.getInput(config);
}
/**
* Parses a proto Matcher into a UnifiedMatcher.
*
* @param proto the proto matcher
* @param actionValidator a predicate that returns true if the action type URL is supported
*/
static UnifiedMatcher fromProto(Matcher proto,
Predicate<String> actionValidator) {
checkRecursionDepth(proto, 0);
Matcher.OnMatch onNoMatch = proto.hasOnNoMatch() ? proto.getOnNoMatch() : null;
if (proto.hasMatcherList()) {
return new MatcherList(proto.getMatcherList(), onNoMatch, actionValidator);
} else if (proto.hasMatcherTree()) {
return new MatcherTree(proto.getMatcherTree(), onNoMatch, actionValidator);View on GitHub (pinned to 64daddc1f3)