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

  1. Use the full ghidra:// protocol URL format: ghidra://<host>/<repository-name> for server repos or ghida://<local-path> for local projects.
  2. Double-check that the URL was generated by Ghidra's 'Copy URL' feature or constructed with GhidraURL.makeURL().
  3. 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

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


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/59cf6873795c3923. Report an issue: GitHub.