NationalSecurityAgency/ghidra · error · TypeError
Method requires trace binding
Error message
Method requires trace binding
What it means
Raised as TypeError by Client._read_argument() when an incoming method argument has schema OBJECT but there is no Trace bound to the invocation (trace is None). An OBJECT argument must be materialized as a TraceObject belonging to a specific Trace; with no trace binding there is nowhere to anchor the object, so the deserialization cannot proceed.
Source
Thrown at Ghidra/Debug/Debugger-rmi-trace/src/main/py/src/ghidratrace/client.py:1274
return self._batch_or_now(root, 'reply_get_object', _handle)
@staticmethod
def _read_values(reply: bufs.ReplyGetValues) -> List[Tuple[
DetachedObject, Lifespan, str, Tuple[Any, sch.Schema]]]:
return [
(Client._read_obj_desc(v.parent), Client._read_span(v.span),
v.key, Client._read_value(v.value))
for v in reply.values
]
@staticmethod
def _read_argument(arg: bufs.MethodArgument,
trace: Optional[Trace]) -> Tuple[str, Any]:
name = arg.name
value, schema = Client._read_value(arg.value)
if schema is sch.OBJECT:
if trace is None:
raise TypeError("Method requires trace binding")
if not isinstance(value, DetachedObject):
raise TypeError(
"Internal: sch.OBJECT expects DetachedObject in args")
id, path = value.id, value.path
return name, trace.proxy_object(id=id, path=path)
return name, value
@staticmethod
def _read_arguments(arguments: Iterable[bufs.MethodArgument],
trace: Optional[Trace]) -> Dict[str, Any]:
kwargs = {}
for arg in arguments:
name, value = Client._read_argument(arg, trace)
kwargs[name] = value
return kwargs
def _get_values(self, id: int, span: Lifespan, pattern: str) -> Union[
List[Tuple[DetachedObject, Lifespan, str, Tuple[Any, sch.Schema]]],View on GitHub (pinned to d5f144c24d)
Solutions
- Ensure methods that declare OBJECT arguments are bound to a trace (include an oid in the invocation).
- Re-check the method's registration metadata so the trace-required flag matches its argument schema.
- If the method is genuinely trace-less, do not declare object-typed arguments.
Example fix
// before: method registered as trace-less but takes an object arg // after: bind the invocation to a trace / mark the method as trace-required
Defensive patterns
Strategy: validation
Validate before calling
if arg_schema == sch.OBJECT and trace is None:
raise TypeError('Cannot bind object arg without a trace') Prevention
- Keep method trace-binding flags consistent with their object arguments.
- Bind trace-scoped invocations to a valid oid.
When it happens
Trigger: The server invokes a registered method whose argument list includes an OBJECT-typed parameter, but the request carried no oid (no trace was bound). This happens when a method is registered as not requiring a trace yet declares an object argument, or when a client invokes a method without an oid but passes an object.
Common situations: Registering a method with @method decorators where the trace binding flag disagrees with the presence of object arguments; client/server method-schema disagreement.
Related errors
- Object/proxy has neither id nor path!: {}
- Must have id or path
- Cannot convert: {value:r}
- Cannot write Value: {schema}, {value}, {type(value)}
- Could not read value: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/b83a2936f7856611.
Report an issue: GitHub.