t8y2/dbx · error

unknown method: %s

Error message

unknown method: %s

What it means

The server's method dispatcher (a switch over RPC method names) returns this error from its default branch when the client requests a method the server does not implement. It means the request never reached any handler: the method name is misspelled or unsupported by this agent build/version.

Source

Thrown at agents/drivers/neo4j-go/main.go:487

		result, err := s.executeQueryPage(options, 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) beginOperation(timeoutSecs int) (context.Context, context.CancelFunc) {
	ctx := context.Background()
	var cancel context.CancelFunc
	if timeoutSecs > 0 {
		ctx, cancel = context.WithTimeout(ctx, time.Duration(timeoutSecs)*time.Second)
	} else {
		ctx, cancel = context.WithCancel(ctx)
	}
	s.activeCancelMu.Lock()
	s.activeCancel = cancel
	s.activeCancelMu.Unlock()
	return ctx, cancel
}

func (s *server) endOperation(cancel context.CancelFunc) {

View on GitHub (pinned to c0390bff16)

Solutions

  1. Check the exact method string against the methods the server's switch handles and fix the typo/casing
  2. Align client and agent versions so both speak the same protocol
  3. Log the received method name and compare with the client's call site
  4. Add the missing case to the dispatcher if the method is genuinely intended to exist

Example fix

// before
resp := call("FetchPage", params) // wrong casing
// after
resp := call("fetch", params) // matches dispatcher case
Defensive patterns

Strategy: validation

Validate before calling

var supportedMethods = map[string]bool{"connect": true, "query": true, "fetch": true, "disconnect": true, "shutdown": true}
if !supportedMethods[method] {
    return fmt.Errorf("method %q not supported by this agent version", method)
}

Try / catch

resp, err := call(method, params)
if err != nil && strings.Contains(err.Error(), "unknown method") {
    return fmt.Errorf("agent does not support %q (version mismatch?): %w", method, err)
}

Prevention

When it happens

Trigger: Sending an RPC request whose method string is not one of the cases handled by the switch (e.g. a typo like 'exceute', a method from a newer/older protocol version, or a client built against a different driver).

Common situations: Client and agent version skew after an upgrade (client calls a new method the old agent lacks); renaming a method on one side only; hand-written test harnesses calling methods with wrong casing.

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/825a8c7e94c170fa. Report an issue: GitHub.