{"record":{"id":"92baed1d8624569f","repo":"dotnet/aspnetcore","slug":"the-message-type-s-is-not-supported-yet-92baed","errorCode":null,"errorMessage":"The message type %s is not supported yet.","messagePattern":"The message type (.+?) is not supported yet\\.","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"src/SignalR/clients/java/signalr/core/src/main/java/com/microsoft/signalr/HubConnection.java","lineNumber":527,"sourceCode":"                        continue;\n                    }\n                    irq.complete(completionMessage);\n                    break;\n                case STREAM_ITEM:\n                    StreamItem streamItem = (StreamItem)message;\n                    InvocationRequest streamInvocationRequest = connectionState.getInvocation(streamItem.getInvocationId());\n                    if (streamInvocationRequest == null) {\n                        logger.warn(\"Dropped unsolicited Completion message for invocation '{}'.\", streamItem.getInvocationId());\n                        continue;\n                    }\n\n                    streamInvocationRequest.addItem(streamItem);\n                    break;\n                case STREAM_INVOCATION:\n                case CANCEL_INVOCATION:\n                    logger.error(\"This client does not support {} messages.\", message.getMessageType());\n\n                    throw new UnsupportedOperationException(String.format(\"The message type %s is not supported yet.\", message.getMessageType()));\n            }\n        }\n    }\n\n    /**\n     * Stops a connection to the server.\n     *\n     * @return A Completable that completes when the connection has been stopped.\n     */\n    public Completable stop() {\n        return stop(null);\n    }\n\n    private void stopConnection(String errorMessage) {\n        RuntimeException exception = null;\n        this.state.lock();\n        try {\n            ConnectionState connectionState = this.state.getConnectionStateUnsynchronized(true);","sourceCodeStart":509,"sourceCodeEnd":545,"githubUrl":"https://github.com/dotnet/aspnetcore/blob/3600ca084e9c8b5f4174fc5e747f4c52d2100806/src/SignalR/clients/java/signalr/core/src/main/java/com/microsoft/signalr/HubConnection.java#L509-L545","documentation":"Thrown from the inbound message dispatch loop when the server sends a STREAM_INVOCATION or CANCEL_INVOCATION message. This Java client only handles client-side invocation, stream invocation, stream items, completion, close, and ping; it deliberately does not support receiving stream invocations from the server or cancel messages, so it raises UnsupportedOperationException with the offending message type name.","triggerScenarios":"A server hub invokes a streaming method ON the client (server-to-client streaming), or the server sends a CancelInvocationMessage to abort a client-side invocation. Inside processMessages() the switch hits the STREAM_INVOCATION / CANCEL_INVOCATION fall-through cases.","commonSituations":"Mixing this client with a hub designed for the .NET or JavaScript client which supports server-to-client streaming; protocol mismatch where the server treats the client as a streaming source; a misrouted message due to a reused connectionId after a reconnect.","solutions":["Stop the server from sending streaming/cancel messages to this client: ensure the hub method invoked is not a ChannelAsync/IAsyncEnumerable streamed TO the client.","Upgrade the Java client to a version that supports the missing message types (track the aspnetcore issue for client streaming support).","If unavoidable, catch UnsupportedOperationException around the connection's message loop and log/skip, though the connection is then in an undefined state - prefer restarting the connection."],"exampleFix":"// before\nhub.on(\"StreamData\", ...); // server streams TO client -> unsupported\n\n// after - use a regular invocation the client polls, or move the\n// streaming consumer to the JS/.NET client\nhub.invoke(\"GetDataBatch\").subscribe(...);","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// The throw happens inside the message-processing loop. Best effort:\n// catch at the connection boundary and restart.\nhub.onClosed(ex -> {\n  if (ex instanceof UnsupportedOperationException\n      && ex.getMessage().contains(\"not supported yet\")) {\n    log.warn(\"Unsupported server message; restarting connection\");\n    hub.start().subscribe();\n  }\n});","preventionTips":["Do not design server hubs that stream TO Java clients - use invoke+poll or switch client.","Track which SignalR message types the Java client supports before relying on them.","Add an integration test that exercises every hub method invoked from this client."],"tags":["signalr","java","protocol","message-type","streaming"],"backgroundTag":null,"analyzedSha":"3600ca084e9c8b5f4174fc5e747f4c52d2100806","analyzedAt":"2026-08-11T16:32:30.678Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}