egametang/ET · error · Exception
not found handler: {message}
Error message
not found handler: {message} What it means
Thrown by the Realm server message dispatcher (NetComponentOnReadInvoker_Realm) when an incoming message does not implement ISessionMessage. The Realm scene only dispatches session-based messages; anything else hits the default throw. The switch has only two cases: ISessionMessage (dispatched) and default (thrown).
Source
Thrown at Packages/cn.etetet.login/Scripts/Hotfix/Server/Realm/NetComponentOnReadInvoker_Realm.cs:31
MessageStatisticsComponent messageStatisticsComponent = session.GetComponent<MessageStatisticsComponent>();
if (!messageStatisticsComponent.Check(message.GetType(), 10))
{
session.Error = ErrorCode.ERR_MessageCountTooMany;
session.Dispose();
return;
}
// 根据消息接口判断是不是Actor消息,不同的接口做不同的处理,比如需要转发给Chat Scene,可以做一个IChatMessage接口
switch (message)
{
case ISessionMessage:
{
MessageSessionDispatcher.Instance.Handle(session, message);
break;
}
default:
{
throw new Exception($"not found handler: {message}");
}
}
}
}
}View on GitHub (pinned to 5cab01f7a8)
Solutions
- Ensure the message type implements ISessionMessage if it should be dispatched by the Realm.
- Verify the client is connecting to the correct scene type for the messages it sends.
- If non-session messages should be supported, add the appropriate case to the switch.
Example fix
// before: only ISessionMessage is handled
switch (message)
{
case ISessionMessage:
MessageSessionDispatcher.Instance.Handle(session, message);
break;
default:
throw new Exception($"not found handler: {message}");
}
// after: add IRequest handling if needed
case IRequest request:
MessageSessionDispatcher.Instance.Handle(session, message);
break; Defensive patterns
Strategy: try-catch
Try / catch
try { DispatchRealmMessage(session, message); } catch (Exception e) { Log.Error($"Realm dispatch failed for {message?.GetType().Name}: {e}"); } Prevention
- Ensure all messages the Realm scene should handle implement ISessionMessage.
- Verify the client connects to the correct scene type for its message protocol.
- Log unrecognized message types to catch protocol drift early.
When it happens
Trigger: A client connects to the Realm server and sends a message that does not implement ISessionMessage. This could be an Actor message, an IRequest, or an unregistered message type.
Common situations: Client sends a login/account message type that doesn't implement ISessionMessage to the Realm. Message protocol mismatch between client and server. A message type was refactored and lost its ISessionMessage interface. Wrong scene type connection — client connected to Realm but sends messages meant for Gate or Map.
Related errors
- not found handler: {message}
- not found handler: {message}
- Only IPv4 addresses are supported
- default conn throw Exception! {channelId}
- bufferList length < count, {Length} {count}
AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13).
Data as JSON: /api/errors/c4b24ebed75ad80b.
Report an issue: GitHub.