t8y2/dbx · error
unknown method: %s
Error message
unknown method: %s
What it means
The server's JSON-RPC method dispatcher has no case for the requested method, so it returns 'unknown method: %s'. This is the driver's protocol-level guard against typos and unsupported operations for the connected agent protocol version.
Source
Thrown at agents/drivers/kingbase-go/main.go:461
result, err := s.executeQueryPage(opts, intParam(params, "pageSize"))
return result, false, err
case "fetch_query_page", "fetch_table_read_page":
result, err := s.fetchQueryPage(stringParam(params, "sessionId"), intParam(params, "pageSize"))
return result, false, err
case "close_query_session", "close_table_read_session":
return s.closeQuerySession(stringParam(params, "sessionId")), false, nil
case "execute_transaction":
result, err := s.executeTransaction(params)
return result, false, err
case "execute_batch":
result, err := s.executeBatch(params)
return result, false, err
case "disconnect":
return map[string]bool{"ok": true}, false, s.disconnect()
case "shutdown":
return map[string]bool{"ok": true}, true, s.disconnect()
default:
return nil, false, fmt.Errorf("unknown method: %s", method)
}
}
func (s *server) connect(cp connectParams) error {
_ = s.disconnect()
db, err := openAndPingDB(cp, defaultConnectTimeout, s.openDatabase)
if err != nil {
return err
}
s.db = db
s.params = cp
s.mode = detectKingbaseMode(db, cp.MySQLCompatMode)
s.mode.legacyV7 = detectKingbaseV7(db)
s.usePgDefaultExpression = false
s.usePgViewDefinition = false
s.usePgFunctionDefinition = false
s.useLegacyRoutineDefinition = false
s.catalogIdentityUnsupported = falseView on GitHub (pinned to c0390bff16)
Solutions
- Check the exact method name against the driver's dispatcher (case-sensitive)
- Align client and driver/runtime versions so both support the method
- List supported methods from the driver source or its README before invoking
- Add a handler case in the dispatcher if the method is genuinely missing
Example fix
// before
{"method": "ExecuteQuery", ...} // wrong casing
// after
{"method": "query", ...} Defensive patterns
Strategy: validation
Validate before calling
// Go: whitelist methods before dispatch
var supported = map[string]bool{"connect": true, "query": true, "disconnect": true, "shutdown": true}
if !supported[method] {
return fmt.Errorf("method %q not supported by this driver", method)
} Try / catch
res, err := s.callMethod(method, params)
if err != nil && strings.Contains(err.Error(), "unknown method") {
return nil, fmt.Errorf("check driver version supports %q: %w", method, err)
} Prevention
- Keep client method list in sync with driver version
- Centralize method-name constants instead of raw strings
- Pin and version-check the agent protocol between client and runtime
When it happens
Trigger: Sending a method name in the RPC request that is not one of the supported cases (e.g. 'query', 'connect', 'disconnect', 'shutdown', and peers) — misspelled method, wrong casing, or a method added in a newer agent protocol than the driver supports.
Common situations: Client built against a newer driver version calling methods an older runtime doesn't implement; typo in the method string in the request payload; copy-pasted method names from a different driver's protocol.
Related errors
- unknown method: %s
- unknown method: %s
- unknown method: %s
- unknown method: %s
- agent session already exists: %s
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/59cc00f95cc14450.
Report an issue: GitHub.