grpc/grpc-java · error · UnsupportedOperationException
Not implemented
Error message
Not implemented
What it means
ManagedChannelBuilder.childChannelConfigurator(ChannelConfigurator) is an ExperimentalApi method (since 1.83.0, issue #12574) whose base implementation throws UnsupportedOperationException. Only builders that support configuring child channels (e.g., for xDS-created internal channels) override it; all other builders inherit the throwing stub. GrpcXdsTransport's childChannelConfigurator invokes it on whatever builder it was handed.
Source
Thrown at api/src/main/java/io/grpc/ManagedChannelBuilder.java:687
public <X> T setNameResolverArg(NameResolver.Args.Key<X> key, X value) {
throw new UnsupportedOperationException();
}
/**
* Sets a configurator that will be applied to all internal child channels created by this
* channel.
*
* <p>This allows injecting universal configuration (like interceptors)
* into auxiliary channels created by gRPC infrastructure, such as xDS control plane connections.
*
* @param channelConfigurator the configurator to apply.
* @return this
* @since 1.83.0
*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/12574")
public T childChannelConfigurator(ChannelConfigurator channelConfigurator) {
throw new UnsupportedOperationException("Not implemented");
}
/**
* Builds a channel using the given parameters.
*
* @since 1.0.0
*/
public abstract ManagedChannel build();
/**
* Returns the correctly typed version of the builder.
*/
private T thisT() {
@SuppressWarnings("unchecked")
T thisT = (T) this;
return thisT;
}
}View on GitHub (pinned to 64daddc1f3)
Solutions
- Only set childChannelConfigurator on builders that support it (check builder type/capabilities before calling, e.g., instanceof NettyChannelBuilder)
- Use NettyChannelBuilder as the underlying builder for xDS so child channels can be configured
- Catch UnsupportedOperationException around the call and skip child-channel configuration when unsupported
- Guard GrpcXdsTransport's childChannelConfigurator invocation so a non-supporting delegate builder degrades gracefully
Example fix
// before
builder.childChannelConfigurator(configurator); // throws on InProcess builder
// after
if (builder instanceof NettyChannelBuilder) {
builder.childChannelConfigurator(configurator);
} // else skip: builder does not support child channel configuration Defensive patterns
Strategy: validation
Validate before calling
// Java: verify builder support before configuring child channels
if (!(builder instanceof NettyChannelBuilder)) {
return; // childChannelConfigurator unsupported
} Type guard
boolean supportsChildChannelConfigurator(ManagedChannelBuilder<?> b) {
return b instanceof NettyChannelBuilder; // builders overriding the 1.83.0 API
} Prevention
- Check the builder type before calling childChannelConfigurator (ExperimentalApi since 1.83.0)
- Use NettyChannelBuilder as the underlying xDS delegate builder
- Wrap the call in try-catch for UnsupportedOperationException when builder support is uncertain
- Pin to a grpc-java version where your builder of choice implements the API
When it happens
Trigger: Calling builder.childChannelConfigurator(configurator) (directly or via GrpcXdsTransport applying a configurator) on a ManagedChannelBuilder implementation — e.g., InProcess or third-party builders — that does not support child channel configuration.
Common situations: xDS setups where the delegate channel builder is not Netty-based (in-process channels, custom builders); code applying a ChannelConfigurator unconditionally regardless of the underlying builder type; newly added 1.83.0 API used with builders that have not been updated.
Related errors
- Can't set TLS settings for ALTS
- Not implemented
- Not implemented
- call forAddress() instead
- Use forPort(int, ServerCredentials) instead
AI-assisted analysis of grpc/grpc-java@64daddc1f3 (2026-09-08).
Data as JSON: /api/errors/ca44ba6f0ea6e9f8.
Report an issue: GitHub.