{"record":{"id":"c25086275e6d0f19","repo":"wavetermdev/waveterm","slug":"rpc-command-msg-command-not-supported-by-t","errorCode":null,"errorMessage":"rpc command \"${msg.command}\" not supported by [${this.routeId}]","messagePattern":"rpc command \"(.+?)\" not supported by \\[(.+?)\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/app/store/wshclient.ts","lineNumber":155,"sourceCode":"            return;\n        }\n        const entry = this.openRpcs.get(msg.resid);\n        if (entry == null) {\n            if (!notFoundLogMap.has(msg.resid)) {\n                notFoundLogMap.set(msg.resid, true);\n                console.log(\"rpc response generator not found\", msg);\n            }\n            return;\n        }\n        entry.msgFn(msg);\n    }\n\n    async handle_message(helper: RpcResponseHelper, data: CommandMessageData): Promise<void> {\n        console.log(`rpc:message[${this.routeId}]`, data?.message);\n    }\n\n    async handle_default(helper: RpcResponseHelper, msg: RpcMessage): Promise<void> {\n        throw new Error(`rpc command \"${msg.command}\" not supported by [${this.routeId}]`);\n    }\n}\n\nexport { RpcResponseHelper, WshClient };\n","sourceCodeStart":137,"sourceCodeEnd":160,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/frontend/app/store/wshclient.ts#L137-L160","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nclass MyClient extends WshClient {}\n\n// after\nclass MyClient extends WshClient {\n    async handle_getfeopts(helper: RpcResponseHelper, msg: RpcMessage): Promise<void> {\n        // implement or ack the command\n    }\n}","handlingStrategy":"try-catch","validationCode":"const handler = `handle_${command}`;\nif (typeof (client as any)[handler] !== \"function\") {\n    console.warn(`command ${command} unsupported on ${routeId}`);\n}","typeGuard":"function hasHandler(client: WshClient, command: string): boolean {\n    return typeof (client as Record<string, unknown>)[`handle_${command}`] === \"function\";\n}","tryCatchPattern":"try {\n    await client.recvMsg(msg);\n} catch (e) {\n    if (String(e.message).includes(\"not supported by\")) {\n        console.warn(`skipping unsupported rpc command: ${msg.command}`);\n    } else { throw e; }\n}","preventionTips":["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"],"tags":["rpc","frontend","protocol-mismatch"],"backgroundTag":"rpc-command-not-supported","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}