NationalSecurityAgency/ghidra · error · IllegalArgumentException
URL is not ghidra protocol: {}
Error message
URL is not ghidra protocol: {} What it means
Thrown by BSimLaunchable.setupGhidraURL() when the provided URL string does not pass GhidraURL.isGhidraURL(). BSim commands that need Ghidra repository access (generatesigs, commitsigs with override) require a URL with the 'ghidra' protocol scheme.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java:233
private BulkSignatures getBulkSignatures()
throws IllegalArgumentException {
BSimServerInfo serverInfo = null;
if (bsimURL != null) {
serverInfo = new BSimServerInfo(bsimURL);
}
String connectingUserName = optionValueMap.get(USER_OPTION);
return new BulkSignatures(serverInfo, connectingUserName);
}
private void setupGhidraURL(String ghidraURLString) throws IllegalArgumentException {
if (ghidraURLString == null) {
return;
}
if (!GhidraURL.isGhidraURL(ghidraURLString)) {
throw new IllegalArgumentException("URL is not ghidra protocol: " + ghidraURLString);
}
ghidraURL = GhidraURL.toURL(ghidraURLString);
if (!GhidraURL.isServerRepositoryURL(ghidraURL) &&
!GhidraURL.isLocalURL(ghidraURL)) {
throw new IllegalArgumentException("Invalid repository URL: " + ghidraURLString);
}
}
/**
* Establish the URL for the ghidra server and/or the bsim server. At least one string must be non-null
* @param ghidraURLString is the URL string for the ghidra server
* @param bsimURLString is the URL string for the bsim server
* @throws MalformedURLException if there is a problem parsing the given URLs
* @throws URISyntaxException if there is a problem parsing the given URLs
* @throws IllegalArgumentException if unsupported URL use occurs
*/
private void setupURLs(String ghidraURLString, String bsimURLString)
throws MalformedURLException, URISyntaxException {View on GitHub (pinned to d5f144c24d)
Solutions
- Use the full ghidra:// protocol URL format: ghidra://<host>/<repository-name> for server repos or ghida://<local-path> for local projects.
- Double-check that the URL was generated by Ghidra's 'Copy URL' feature or constructed with GhidraURL.makeURL().
- If using --config, ensure the config file contains a properly formatted ghidra:// URL in its repository settings.
Example fix
// before bsim generatesigs http://myserver/MyRepo --bsim h2://localhost/bsimdb // error: URL is not ghidra protocol: http://myserver/MyRepo // after bsim generatesigs ghidra://myserver/MyRepo --bsim h2://localhost/bsimdb
Defensive patterns
Strategy: validation
Validate before calling
String url = "http://example.com/Repo";
if (!GhidraURL.isGhidraURL(url)) {
throw new IllegalArgumentException(
"Expected a ghidra:// URL but got: " + url);
}
launchable.setupGhidraURL(url); Prevention
- Always construct ghidra URLs using GhidraURL.makeURL() rather than manual string concatenation.
- Validate URLs with GhidraURL.isGhidraURL() before passing them to BSim commands.
- Use Ghidra's 'Copy URL' feature in the GUI to get correctly formatted URLs.
When it happens
Trigger: Passing a plain HTTP URL ('http://server/repo'), a file system path ('/path/to/project'), or a BSim protocol URL ('h2://...') where a ghidra:// URL is expected. The check fails because the scheme is not 'ghidra'.
Common situations: Confusing the BSim server URL with the Ghidra server URL; using an older URL format that lacks the ghidra:// prefix; copy-pasting a URL from a browser that strips the scheme.
Related errors
- Invalid repository URL: {}
- Unable to infer ghidra URL from BSim file DB URL
- --bsim and --config options may not both be present
- Protocol not permissable for BSim URL
- BSim URL missing DB name/path
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/59cf6873795c3923.
Report an issue: GitHub.