egametang/ET · error

not found handler: {message}

Error message

not found handler: {message}

What it means

Thrown by the Gate server's message dispatcher (NetComponentOnReadInvoker_Gate) when an incoming message does not match any known case: not ISessionMessage (already handled above the switch), not IRequest, and not IMessage. The default case rejects unregistered message types to prevent silent drops. IRequest and IMessage branches exist but are explicitly no-ops ('currently unused, add yourself if needed').

Source

Thrown at Packages/cn.etetet.lockstep/Scripts/Hotfix/Server/Gate/NetComponentOnReadInvoker_Gate.cs:76

                    if (session != null)
                    {
                        session.Send(iResponse);
                    }

                    break;
                }
                case IRequest actorRequest: // 分发IActorRequest消息,目前没有用到,需要的自己添加
                {
                    break;
                }
                case IMessage actorMessage: // 分发IActorMessage消息,目前没有用到,需要的自己添加
                {
                    break;
                }

                default:
                {
                    throw new Exception($"not found handler: {message}");
                }
            }
        }
    }
}

View on GitHub (pinned to 5cab01f7a8)

Solutions

  1. Identify the message type from the error and add a proper case + dispatch handler for it in the Gate invoker switch.
  2. If the message should be routed as an Actor request/message, implement the IRequest/IMessage case bodies instead of leaving them as break.
  3. Verify the client is sending the correct message for the scene type it is connected to.

Example fix

// before: IRequest case is a no-op break
case IRequest actorRequest:
{
    break; // not dispatched
}
// after: dispatch it
case IRequest actorRequest:
{
    MessageSessionDispatcher.Instance.Handle(session, message);
    break;
}
Defensive patterns

Strategy: try-catch

Try / catch

try { DispatchMessage(session, message); } catch (Exception e) { Log.Error($"Gate message dispatch failed for {message?.GetType().Name}: {e}"); }

Prevention

When it happens

Trigger: A client sends a message type that the Gate server's dispatcher switch does not have a case for. Specifically, a message implementing IRequest or IMessage hits the no-op break instead of being dispatched, or a completely unknown message type hits default.

Common situations: Adding a new Actor-based message protocol without updating the Gate dispatcher to handle IRequest/IMessage routing. Client and server protocol versions are out of sync. A message was misrouted to the Gate scene that should have gone to a different scene type.

Related errors


AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13). Data as JSON: /api/errors/06b344227f094e3f. Report an issue: GitHub.