EpicGames/lore · error · anyhow::Error
Received connection for unsupported protocol
Error message
Received connection for unsupported protocol: {protocol:?} What it means
A guard in handle_conn: the client negotiated a valid ALPN protocol, but that protocol string is not registered in the stream handler factory, so no service/stream-handler builder exists for it. It fires when a client speaks a protocol this server build does not support (e.g. an outdated or mismatched client), and the connection is dropped with a warning.
Solutions
- Register a handler for the protocol in the stream handler factory, or update the client to use a protocol the server supports
- Align protocol version strings between client and server deployments
- Check server feature flags/config that gate service registration
Example fix
// before
factory.register("lore/1", handler);
// after
factory.register("lore/1", handler).register("lore/2", handler_v2); Defensive patterns
Strategy: validation
Validate before calling
// client side: verify protocol is supported before connecting
let supported = advertised_protocols(); // fetched or hardcoded per deployment
assert!(supported.contains("lore/1"), "protocol not supported by server"); Try / catch
if let Err(e) = handle_conn(&connection, &factory).await {
if e.to_string().contains("unsupported protocol") {
warn!("client used unsupported protocol; closing gracefully");
return Ok(());
}
return Err(e);
} Prevention
- Coordinate protocol version rollouts between client and server
- Gate handler registration on explicit config, not just feature flags
- Log negotiated protocols to spot mismatches early
When it happens
Trigger: Client negotiates a protocol (via ALPN) that the server's stream_handler_factory has no handler registered for — get_stream_handler_builder(&protocol) returns None.
Common situations: Client updated to a newer protocol version the server hasn't deployed; server started with feature flags that omit a service; typo/divergence in protocol strings between client and server.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- No alpns provided
- Failed to decode protocol
- No protocol found on request
- handler should succeed even for a miss
- Stream handler factory was not set
AI-assisted analysis of EpicGames/lore@074eb0b0d1 (2026-09-13).
Data as JSON: /api/errors/c5293860bc2776a3.
Report an issue: GitHub.
Appendix: source
Thrown at lore-server/src/quic/quinn/quinn_server.rs:295
let protocol = get_protocol(&connection)?;
let connection_id = connection.stable_id();
let conn_span = tracing::Span::current();
conn_span.record("connection_id", connection_id);
conn_span.record("protocol", &protocol);
info!(
remote_address = %connection.remote_address(),
"Established connection",
);
let Some((service_name, service_builder)) =
stream_handler_factory.get_stream_handler_builder(&protocol)
else {
warn!("Protocol {protocol} is not supported by the stream handler factory");
return Err(anyhow!(
"Received connection for unsupported protocol: {protocol:?}"
));
};
let _stats_guard =
track_connection_stats(service_name, &connection, connection_metrics_interval);
let context = Arc::new(AttributeMap::default());
context.insert(conn_span.clone());
context.insert(ConnectionId(connection_id));
// Create the stream handler once per connection so per-connection state
// (e.g. SessionMap in StorageServiceV4) is shared across all streams.
let connection_handler: Arc<Box<dyn StreamDataHandler>> =
Arc::new(service_builder(context.clone()));
// Keeps accepting requests until the connection closes or errors
loop {View on GitHub (pinned to 074eb0b0d1)