dotnet/aspnetcore · error · UnsupportedOperationException

The message type is not supported yet.

Error message

The message type %s is not supported yet.

What it means

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.

Solutions

  1. 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.
  2. Upgrade the Java client to a version that supports the missing message types (track the aspnetcore issue for client streaming support).
  3. 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.

Example fix

// before
hub.on("StreamData", ...); // server streams TO client -> unsupported

// after - use a regular invocation the client polls, or move the
// streaming consumer to the JS/.NET client
hub.invoke("GetDataBatch").subscribe(...);
Defensive patterns

Strategy: try-catch

Try / catch

// The throw happens inside the message-processing loop. Best effort:
// catch at the connection boundary and restart.
hub.onClosed(ex -> {
  if (ex instanceof UnsupportedOperationException
      && ex.getMessage().contains("not supported yet")) {
    log.warn("Unsupported server message; restarting connection");
    hub.start().subscribe();
  }
});

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of dotnet/aspnetcore@3600ca084e (2026-08-11). Data as JSON: /api/errors/92baed1d8624569f. Report an issue: GitHub.

Appendix: source

Thrown at src/SignalR/clients/java/signalr/core/src/main/java/com/microsoft/signalr/HubConnection.java:527

                        continue;
                    }
                    irq.complete(completionMessage);
                    break;
                case STREAM_ITEM:
                    StreamItem streamItem = (StreamItem)message;
                    InvocationRequest streamInvocationRequest = connectionState.getInvocation(streamItem.getInvocationId());
                    if (streamInvocationRequest == null) {
                        logger.warn("Dropped unsolicited Completion message for invocation '{}'.", streamItem.getInvocationId());
                        continue;
                    }

                    streamInvocationRequest.addItem(streamItem);
                    break;
                case STREAM_INVOCATION:
                case CANCEL_INVOCATION:
                    logger.error("This client does not support {} messages.", message.getMessageType());

                    throw new UnsupportedOperationException(String.format("The message type %s is not supported yet.", message.getMessageType()));
            }
        }
    }

    /**
     * Stops a connection to the server.
     *
     * @return A Completable that completes when the connection has been stopped.
     */
    public Completable stop() {
        return stop(null);
    }

    private void stopConnection(String errorMessage) {
        RuntimeException exception = null;
        this.state.lock();
        try {
            ConnectionState connectionState = this.state.getConnectionStateUnsynchronized(true);

View on GitHub (pinned to 3600ca084e)