NationalSecurityAgency/ghidra · error · IsfErrorException
EC_BAD_REQUEST
EC_BAD_REQUEST
Error message
Unrecognized request: {} What it means
IsfErrorException (a RuntimeException) with error code Isf.ErrorCode.EC_BAD_REQUEST thrown by IsfClientHandler when a dispatched message's case (msg.getMsgCase()) matches none of the handled cases (PING, FULL_EXPORT, LOOK_TYPE/SYMBOL/ADDRESS, ENUM_TYPES/SYMBOLS). The default branch formats the unhandled case into the message. It signals an unrecognized or unset protobuf message case.
Source
Thrown at Ghidra/Debug/Debugger-isf/src/main/java/ghidra/dbg/isf/IsfClientHandler.java:94
protected RootMessage processMessage(Isf.RootMessage msg) throws IOException {
switch (msg.getMsgCase()) {
case PING_REQUEST:
return processPing(msg.getSequence(), msg.getPingRequest());
case FULL_EXPORT_REQUEST:
return processFullExport(msg.getSequence(), msg.getFullExportRequest());
case LOOK_TYPE_REQUEST:
return processLookType(msg.getSequence(), msg.getLookTypeRequest());
case LOOK_SYMBOL_REQUEST:
return processLookSym(msg.getSequence(), msg.getLookSymbolRequest());
case LOOK_ADDRESS_REQUEST:
return processLookAddr(msg.getSequence(), msg.getLookAddressRequest());
case ENUM_TYPES_REQUEST:
return processEnumTypes(msg.getSequence(), msg.getEnumTypesRequest());
case ENUM_SYMBOLS_REQUEST:
return processEnumSyms(msg.getSequence(), msg.getEnumSymbolsRequest());
default:
throw new IsfErrorException(Isf.ErrorCode.EC_BAD_REQUEST,
"Unrecognized request: " + msg.getMsgCase());
}
}
protected RootMessage processPing(int seqno, Isf.PingRequest req) {
return Isf.RootMessage.newBuilder()
.setSequence(seqno)
.setPingReply(Isf.PingReply.newBuilder().setContent(req.getContent()))
.build();
}
protected RootMessage processFullExport(int seqno, Isf.FullExportRequest req)
throws IOException {
String data = fullExport(req.getNs());
return Isf.RootMessage.newBuilder()
.setSequence(seqno)
.setFullExportReply(Isf.FullExportReply.newBuilder()
.setValue(data))View on GitHub (pinned to d5f144c24d)
Solutions
- Align the client and server to the same ISF protobuf schema version so every sent case is handled by the server switch.
- Ensure the request oneof is actually set on outgoing RootMessages (avoid dispatching NOT_SET).
- Catch IsfErrorException and inspect getErrorCode()/message to map EC_BAD_REQUEST to a client-side retry or schema upgrade.
- If adding a new request type, add its case to the server dispatch switch before shipping clients that emit it.
Example fix
// before
RootMessage msg = RootMessage.newBuilder().setSequence(seq).build(); // no request set
client.send(msg);
// after
RootMessage msg = RootMessage.newBuilder()
.setSequence(seq)
.setPingRequest(Isf.PingRequest.newBuilder().setContent("hi"))
.build();
client.send(msg); Defensive patterns
Strategy: validation
Validate before calling
Isf.RootMessage.MsgCase c = msg.getMsgCase();
if (c == Isf.RootMessage.MsgCase.NOT_SET || !HANDLED_CASES.contains(c)) {
// do not dispatch; reject at the client before sending
} Try / catch
try {
handler.dispatch(msg);
} catch (IsfErrorException e) {
if (e.getErrorCode() == Isf.ErrorCode.EC_BAD_REQUEST) {
// unrecognized case; check client/server schema version alignment
}
} Prevention
- Keep client and server on the same ISF protobuf schema version.
- Always set a recognized request oneof on outgoing RootMessages.
- Add new cases to the server switch before shipping clients that emit them.
When it happens
Trigger: An ISF client sends a RootMessage whose msgCase is not one of the handled request types, or whose request oneof field is not set (getMsgCase returns NOT_SET or an unknown enum value after a version skew). The switch in dispatch hits default.
Common situations: Client and server built from different versions of the ISF protobuf schema (client sends a newer request type the server does not know); a malformed/empty RootMessage with no request set; a client bug sending the wrong message type for the operation.
Related errors
- File does not correspond to Program content: {}
- Null datatype passed to getIsfObject
- Bad address format: {}
- Unsupported value: {}
- Invalid value for {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/25c79ea2f972f0b0.
Report an issue: GitHub.