wavetermdev/waveterm · error
rpc command "${msg.command}" not supported by [${this.routeI
Error message
rpc command "${msg.command}" not supported by [${this.routeId}] What it means
WshClient.handle_default is the fallback handler invoked when an incoming RPC message names a command that the client subclass has not registered a handle_* method for. The wsh RPC layer dispatches messages by command name; if no matching handler exists, this default throws. It indicates the frontend received an RPC command it does not support on that route.
Source
Thrown at frontend/app/store/wshclient.ts:155
return;
}
const entry = this.openRpcs.get(msg.resid);
if (entry == null) {
if (!notFoundLogMap.has(msg.resid)) {
notFoundLogMap.set(msg.resid, true);
console.log("rpc response generator not found", msg);
}
return;
}
entry.msgFn(msg);
}
async handle_message(helper: RpcResponseHelper, data: CommandMessageData): Promise<void> {
console.log(`rpc:message[${this.routeId}]`, data?.message);
}
async handle_default(helper: RpcResponseHelper, msg: RpcMessage): Promise<void> {
throw new Error(`rpc command "${msg.command}" not supported by [${this.routeId}]`);
}
}
export { RpcResponseHelper, WshClient };
View on GitHub (pinned to a4447c1563)
Solutions
- Check the command name in the error message and add a corresponding `handle_<command>` method to the WshClient subclass
- Rebuild/sync both sides (frontend and wsh/server) so they agree on the RPC command set
- Verify the sender is targeting the correct routeId that actually implements the command
Example fix
// before
class MyClient extends WshClient {}
// after
class MyClient extends WshClient {
async handle_getfeopts(helper: RpcResponseHelper, msg: RpcMessage): Promise<void> {
// implement or ack the command
}
} Defensive patterns
Strategy: try-catch
Validate before calling
const handler = `handle_${command}`;
if (typeof (client as any)[handler] !== "function") {
console.warn(`command ${command} unsupported on ${routeId}`);
} Type guard
function hasHandler(client: WshClient, command: string): boolean {
return typeof (client as Record<string, unknown>)[`handle_${command}`] === "function";
} Try / catch
try {
await client.recvMsg(msg);
} catch (e) {
if (String(e.message).includes("not supported by")) {
console.warn(`skipping unsupported rpc command: ${msg.command}`);
} else { throw e; }
} Prevention
- Keep sender and receiver RPC command lists in sync; rebuild both sides together
- Name handle_* methods exactly after the command string
- Add a dispatch test asserting every sent command has a handler
When it happens
Trigger: An RPC message with a `command` field arrives on a WshClient route whose subclass lacks a `handle_<command>` method; handleIncomingCommand falls through to handle_default.
Common situations: Version mismatch between the sender (e.g. wsh CLI or server) and the frontend build; a new RPC command added on one side but not the other; a typo in a handle_* method name so dispatch misses it; stale webview bundles.
Related errors
- error waiting for vdom context route: %v
- Layout model not found
- Block not found: ${blockId}
- Block not found in tab: ${blockId}
- call ${methodName} error: ${respData.error}
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/c25086275e6d0f19.
Report an issue: GitHub.