{"record":{"id":"6d44c4c7f001d3c7","repo":"apache/beam","slug":"unknown-type","errorCode":null,"errorMessage":"Unknown type ","messagePattern":"Unknown type ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/fn/channel/ManagedChannelFactory.java","lineNumber":83,"sourceCode":"        channelBuilder =\n            NettyChannelBuilder.forAddress(address)\n                .channelType(\n                    address instanceof DomainSocketAddress\n                        ? EpollDomainSocketChannel.class\n                        : EpollSocketChannel.class)\n                .eventLoopGroup(new EpollEventLoopGroup());\n        break;\n\n      case DEFAULT:\n        channelBuilder = ManagedChannelBuilder.forTarget(apiServiceDescriptor.getUrl());\n        break;\n\n      case IN_PROCESS:\n        channelBuilder = InProcessChannelBuilder.forName(apiServiceDescriptor.getUrl());\n        break;\n\n      default:\n        throw new IllegalStateException(\"Unknown type \" + type);\n    }\n\n    channelBuilder =\n        channelBuilder\n            .usePlaintext()\n            // Set the message size to max value here. The actual size is governed by the\n            // buffer size in the layers above.\n            .maxInboundMessageSize(Integer.MAX_VALUE)\n            // Disable automatic retries as it introduces complexity and we send long-lived\n            // rpcs which will exceed the per-rpc retry request buffer and not be retried\n            // anyway. See\n            // https://github.com/grpc/proposal/blob/master/A6-client-retries.md#when-retries-are-valid\n            .disableRetry()\n            .intercept(interceptors);\n    if (directExecutor) {\n      channelBuilder = channelBuilder.directExecutor();\n    }\n    return channelBuilder.build();","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/fn/channel/ManagedChannelFactory.java#L65-L101","documentation":"ManagedChannelFactory.forDescriptor switches over the ApiServiceDescriptor's enum method type to build a gRPC channel. Hitting the default branch means the descriptor carried an enum value this Beam version does not recognize, so channel creation cannot proceed and an IllegalStateException is thrown.","triggerScenarios":"An ApiServiceDescriptor from a newer/older Beam or runner specifies a channel type enum absent from this client's ManagedChannelFactory.ChannelType (only LEGACY/remote and IN_PROCESS are handled).","commonSituations":"Version skew between the job server/expansion service and the SDK harness; custom descriptors built with the wrong enum; mixing Beam versions in container images.","solutions":["Align Beam versions between the runner/job server and SDK harness so channel type enums match.","Check the ApiServiceDescriptor.getUrl() and its type field for accidental custom/incorrect values.","Upgrade the SDK containing ManagedChannelFactory to a version supporting the descriptor's channel type."],"exampleFix":"// before\nApiServiceDescriptor descriptor = ApiServiceDescriptor.newBuilder()\n    .setUrl(\"localhost:0\")\n    .setChannelType(\"unsupported_future_type\") // unknown enum\n    .build();\n// after\nApiServiceDescriptor descriptor = ApiServiceDescriptor.newBuilder()\n    .setUrl(\"localhost:0\") // rely on default/known channel type\n    .build();","handlingStrategy":"validation","validationCode":"if (!EnumSet.allOf(ManagedChannelFactory.ChannelType.class)\n    .contains(descriptor.getChannelType()))\n  throw new IllegalArgumentException(\"unsupported channel type: \" + descriptor.getChannelType());","typeGuard":null,"tryCatchPattern":"try { channel = ManagedChannelFactory.forDescriptor(desc); } catch (IllegalStateException e) { /* version skew: align Beam versions */ throw e; }","preventionTips":["Pin identical Beam versions across runner, job server, and SDK harness images","Avoid hand-crafting ApiServiceDescriptor channel type fields","Test cross-language pipelines with matching container tags"],"tags":["beam","grpc","channel-factory","enum","version-skew"],"backgroundTag":"invalid-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}