NationalSecurityAgency/ghidra · error · FunctionComparisonException
Couldn't open remote program: {} for {}.
Error message
Couldn't open remote program: {} for {}. What it means
BSimSearchResultsProvider.getMatchFunction() attempts to open the remote program referenced by the BSim match result via getCachedRemoteProgram(). If that returns null it throws FunctionComparisonException. The remote program (the matched executable on the BSim/Ghidra server) could not be opened or downloaded.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/results/BSimSearchResultsProvider.java:533
throws FunctionComparisonException {
// Determine the original function (local program's function; left side)
Address originalEntryPoint = resultRow.getAddress();
FunctionManager originalFunctionManager = program.getFunctionManager();
Function originalFunction = originalFunctionManager.getFunctionAt(originalEntryPoint);
if (originalFunction == null) {
throw new FunctionComparisonException("Couldn't get local function " +
resultRow.getOriginalFunctionDescription().getFunctionName() + " at " +
originalEntryPoint.toString() + ".");
}
return originalFunction;
}
private Function getMatchFunction(BSimMatchResult resultRow, Set<Program> opened)
throws FunctionComparisonException {
// Determine the match function (remote program's function; right side)
Program matchProgram = getCachedRemoteProgram(resultRow.getExecutableURLString(), opened);
if (matchProgram == null) {
throw new FunctionComparisonException(
"Couldn't open remote program: " + resultRow.getExecutableURLString() + " for " +
resultRow.getSimilarFunctionName() + ".");
}
FunctionDescription matchFunctionDescription = resultRow.getMatchFunctionDescription();
long matchOffset = matchFunctionDescription.getAddress();
Address matchEntryPoint =
matchProgram.getAddressFactory().getDefaultAddressSpace().getAddress(matchOffset);
FunctionManager matchFunctionManager = matchProgram.getFunctionManager();
Function matchFunction = matchFunctionManager.getFunctionAt(matchEntryPoint);
if (matchFunction == null) {
throw new FunctionComparisonException("Couldn't get remote function " +
matchFunctionDescription.getFunctionName() + " at " + matchEntryPoint + ".");
}
return matchFunction;
}
private class BSimMatchesTableActionContext extends DefaultActionContext {
View on GitHub (pinned to d5f144c24d)
Solutions
- Verify network connectivity to the Ghidra server hosting the remote program.
- Check that the remote program still exists at the URL stored in the BSim match (browse the server repository).
- Verify authentication credentials and permissions for the remote repository.
- If the server was migrated, re-ingest executables so BSim stores current URLs.
- Retry after confirming server availability — transient network failures may resolve.
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check remote program accessibility
Program test = getCachedRemoteProgram(urlString, new HashSet<>());
if (test == null) {
// warn user: remote program unavailable, skip comparison for this match
} Try / catch
try {
getMatchFunction(resultRow, opened);
} catch (FunctionComparisonException e) {
if (e.getMessage().startsWith("Couldn't open remote program")) {
// log URL, notify user of connectivity/permissions issue, skip match
} else {
throw e;
}
} Prevention
- Verify Ghidra server connectivity and credentials before initiating BSim comparisons.
- Cache remote programs to reduce repeated fetch failures on transient network issues.
- Present a clear error indicating the remote URL and likely cause (network vs. permissions).
- Re-ingest executables after server migrations so BSim URLs stay current.
When it happens
Trigger: Calling getMatchFunction(resultRow, opened) where getCachedRemoteProgram(resultRow.getExecutableURLString(), opened) returns null. The remote program URL string could not be resolved to an openable Program.
Common situations: The remote Ghidra server is unreachable or the program was removed from the server; authentication/permissions prevent downloading the remote program; network issues (timeout, firewall) during program fetch; the executable URL stored in BSim is stale (server reorganized repos); the remote program file is corrupted on the server.
Related errors
- Couldn't get remote function {} at {}.
- Couldn't get local function {} at {}.
- URL is missing a repository path
- Could not start postgres server process
- Unable to connect to server
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/b00ccb9f91ebe88a.
Report an issue: GitHub.