{"record":{"id":"a60a44edf9335a84","repo":"grpc/grpc-java","slug":"filterchain-filterchainname-contains-filter-l-a60a44","errorCode":null,"errorMessage":"FilterChain ${filterChainName} contains filter ${l4Filter.getName()} with unsupported typed_config type ${any.getTypeUrl()}","messagePattern":"FilterChain (.+?) contains filter (.+?) with unsupported typed_config type (.+?)","errorType":"exception","errorClass":"ResourceInvalidException","httpStatus":null,"severity":"error","filePath":"xds/src/main/java/io/grpc/xds/XdsListenerResource.java","lineNumber":253,"sourceCode":"    io.envoyproxy.envoy.config.listener.v3.Filter l4Filter = proto.getFiltersList().get(0);\n    if (!l4Filter.hasTypedConfig()) {\n      throw new ResourceInvalidException(\n          \"FilterChain \" + filterChainName + \" contains filter \" + l4Filter.getName()\n              + \" without typed_config\");\n    }\n    Any any = l4Filter.getTypedConfig();\n    if (!any.getTypeUrl().equals(TYPE_URL_HTTP_CONNECTION_MANAGER)) {\n      throw new ResourceInvalidException(\n          \"FilterChain \" + filterChainName + \" contains filter \" + l4Filter.getName()\n              + \" with unsupported typed_config type \" + any.getTypeUrl());\n    }\n\n    // Parse HCM.\n    HttpConnectionManager hcmProto;\n    try {\n      hcmProto = any.unpack(HttpConnectionManager.class);\n    } catch (InvalidProtocolBufferException e) {\n      throw new ResourceInvalidException(\"FilterChain \" + filterChainName + \" with filter \"\n          + l4Filter.getName() + \" failed to unpack message\", e);\n    }\n    io.grpc.xds.HttpConnectionManager httpConnectionManager = parseHttpConnectionManager(\n        hcmProto, filterRegistry, false /* isForClient */, args);\n\n    // Parse Transport Socket.\n    EnvoyServerProtoData.DownstreamTlsContext downstreamTlsContext = null;\n    if (proto.hasTransportSocket()) {\n      if (!TRANSPORT_SOCKET_NAME_TLS.equals(proto.getTransportSocket().getName())) {\n        throw new ResourceInvalidException(\"transport-socket with name \"\n            + proto.getTransportSocket().getName() + \" not supported.\");\n      }\n      DownstreamTlsContext downstreamTlsContextProto;\n      try {\n        downstreamTlsContextProto =\n            proto.getTransportSocket().getTypedConfig().unpack(DownstreamTlsContext.class);\n      } catch (InvalidProtocolBufferException e) {\n        throw new ResourceInvalidException(\"FilterChain \" + filterChainName","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/grpc/grpc-java/blob/64daddc1f3d1975670f769f3e97bde8b2ba32d25/xds/src/main/java/io/grpc/xds/XdsListenerResource.java#L235-L271","documentation":"This message is thrown when the single filter's typed_config has a valid-looking type_url but the Any payload cannot be unpacked into an HttpConnectionManager protobuf - the serialized bytes are corrupt, truncated, or of a different message shape than the type_url claims. The ResourceInvalidException wraps the InvalidProtocolBufferException.","triggerScenarios":"any.unpack(HttpConnectionManager.class) throws InvalidProtocolBufferException inside parseFilterChain because the typed_config bytes do not deserialize as the v3 HttpConnectionManager message.","commonSituations":"Type_url/bytes mismatch after control-plane proto upgrades (v2 bytes under v3 URL); corrupted Any payloads from custom marshaling; management server bugs emitting malformed Any.","solutions":["Regenerate the typed_config so the bytes are a correctly serialized v3 HttpConnectionManager matching the type_url","Verify with a protobuf decoder (protoc --decode) that the Any payload parses as HttpConnectionManager","Align the management server's Envoy API versions with the gRPC xDS library's expected v3 schemas"],"exampleFix":"// before\nAny any = Any.pack(v2Hcm); // v2 message under v3 type_url\n// after\nAny any = Any.pack(v3HttpConnectionManager);","handlingStrategy":"try-catch","validationCode":"if (fc.getFiltersCount() == 1 && fc.getFilters(0).hasTypedConfig()\n    && !fc.getFilters(0).getTypedConfig().getTypeUrl()\n        .endsWith(\"v3.HttpConnectionManager\")) {\n  throw new IllegalArgumentException(\"Expected v3 HCM type_url\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  listener = XdsListenerResource.parseServerSideListener(proto, ...);\n} catch (ResourceInvalidException e) {\n  if (e.getMessage().contains(\"failed to unpack message\")) {\n    logger.warn(\"HCM typed_config bytes are corrupt or version-mismatched\", e);\n  }\n}","preventionTips":["Ensure type_url and serialized message version always match (v3)","Round-trip test management-server output through the same proto library","Reject resources in CI whose Any payloads fail protoc --decode"],"tags":["xds","grpc","protobuf-unmarshal","filter-chain"],"backgroundTag":"protobuf-unmarshal-failed","analyzedSha":"64daddc1f3d1975670f769f3e97bde8b2ba32d25","analyzedAt":"2026-09-08T06:14:57.704Z","contentChangedAt":"2026-09-08T06:14:57.704Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}