NationalSecurityAgency/ghidra · error · IllegalArgumentException
Missing or invalid command specified
Error message
Missing or invalid command specified
What it means
Thrown by run() when params[0] is not in COMMAND_SET. The valid commands are: createdatabase, dropdatabase, setmetadata, getmetadata, addexecategory, addfunctiontag, dropindex, rebuildindex, prewarm, generatesigs, commitsigs, generateupdates, commitupdates, delete, listfuncs, listexes, getexecount, dumpsigs. Any other string in the command position is rejected.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java:400
}
/**
* Runs the command specified by the given set of params.
*
* @param params the parameters specifying the command
* @param monitor the task monitor
* @throws IllegalArgumentException if invalid params have been specified
* @throws Exception if there's an error during the operation
* @throws CancelledException if processing is cancelled
*/
public void run(String[] params, TaskMonitor monitor) throws Exception, CancelledException {
clearParams();
checkRequiredParam(params, 0, "command");
String command = params[0];
if (!COMMAND_SET.contains(command)) {
throw new IllegalArgumentException("Missing or invalid command specified");
}
checkRequiredParam(params, 1, "URL");
String urlstring = params[1];
monitor.setCancelEnabled(true);
List<String> subParams = readOptions(command, params, 2);
initializeApplication(command);
if (COMMAND_CREATE_DATABASE.equals(command)) {
bsimURL = BSimClientFactory.deriveBSimURL(urlstring);
doCreateDatabase(subParams);
}
else if (COMMAND_DROP_DATABASE.equals(command)) {
bsimURL = BSimClientFactory.deriveBSimURL(urlstring);
doDropDatabase(subParams);View on GitHub (pinned to d5f144c24d)
Solutions
- Verify the command name is spelled exactly as defined in the defineCommand() calls (lines 59-76).
- Check the Ghidra/BSim documentation for the current list of supported commands.
- Ensure no extra arguments precede the command name (e.g., flags like --verbose are not supported before the command).
Example fix
// before bsim gensigs ghidra://server/Repo --bsim h2://localhost/db // error: Missing or invalid command specified // after bsim generatesigs ghidra://server/Repo --bsim h2://localhost/db
Defensive patterns
Strategy: validation
Validate before calling
Set<String> validCommands = Set.of(
"createdatabase","dropdatabase","setmetadata","getmetadata",
"addexecategory","addfunctiontag","dropindex","rebuildindex",
"prewarm","generatesigs","commitsigs","generateupdates",
"commitupdates","delete","listfuncs","listexes","getexecount","dumpsigs");
if (!validCommands.contains(command)) {
System.err.println("Unknown command: " + command);
System.err.println("Valid commands: " + validCommands);
return;
} Prevention
- Verify the command name against the list defined by defineCommand() calls (lines 59-76).
- Check for typos — command names are single words with no hyphens or underscores.
- Consult BSim documentation for the current command set in your Ghidra version.
When it happens
Trigger: Misspelling a command name (e.g., 'createdb' instead of 'createdatabase', 'gensigs' instead of 'generatesigs'); using a deprecated or removed command name; passing a file path or URL as the first argument instead of a command name.
Common situations: Typo in the command; using a command name from a different version of Ghidra that renamed or removed it; wrapper script that passes arguments in the wrong order.
Related errors
- Unsupported option use: {}
- Unexpected argument: {}
- Unsupported option specification: {}=
- Missing option value: {}
- Missing required parameter: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/8b7d0ff7c7eed082.
Report an issue: GitHub.