{"record":{"id":"59cf6873795c3923","repo":"NationalSecurityAgency/ghidra","slug":"url-is-not-ghidra-protocol","errorCode":null,"errorMessage":"URL is not ghidra protocol: {}","messagePattern":"URL is not ghidra protocol: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java","lineNumber":233,"sourceCode":"\n\tprivate BulkSignatures getBulkSignatures()\n\t\t\tthrows IllegalArgumentException {\n\t\tBSimServerInfo serverInfo = null;\n\t\tif (bsimURL != null) {\n\t\t\tserverInfo = new BSimServerInfo(bsimURL);\n\t\t}\n\t\tString connectingUserName = optionValueMap.get(USER_OPTION);\n\t\treturn new BulkSignatures(serverInfo, connectingUserName);\n\t}\n\n\tprivate void setupGhidraURL(String ghidraURLString) throws IllegalArgumentException {\n\n\t\tif (ghidraURLString == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!GhidraURL.isGhidraURL(ghidraURLString)) {\n\t\t\tthrow new IllegalArgumentException(\"URL is not ghidra protocol: \" + ghidraURLString);\n\t\t}\n\t\tghidraURL = GhidraURL.toURL(ghidraURLString);\n\t\tif (!GhidraURL.isServerRepositoryURL(ghidraURL) &&\n\t\t\t!GhidraURL.isLocalURL(ghidraURL)) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid repository URL: \" + ghidraURLString);\n\t\t}\n\t}\n\n\t/**\n\t * Establish the URL for the ghidra server and/or the bsim server. At least one string must be non-null\n\t * @param ghidraURLString is the URL string for the ghidra server\n\t * @param bsimURLString is the URL string for the bsim server\n\t * @throws MalformedURLException if there is a problem parsing the given URLs\n\t * @throws URISyntaxException if there is a problem parsing the given URLs\n\t * @throws IllegalArgumentException if unsupported URL use occurs\n\t */\n\tprivate void setupURLs(String ghidraURLString, String bsimURLString)\n\t\t\tthrows MalformedURLException, URISyntaxException {","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java#L215-L251","documentation":"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.","triggerScenarios":"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'.","commonSituations":"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.","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."],"exampleFix":"// before\nbsim generatesigs http://myserver/MyRepo --bsim h2://localhost/bsimdb\n// error: URL is not ghidra protocol: http://myserver/MyRepo\n\n// after\nbsim generatesigs ghidra://myserver/MyRepo --bsim h2://localhost/bsimdb","handlingStrategy":"validation","validationCode":"String url = \"http://example.com/Repo\";\nif (!GhidraURL.isGhidraURL(url)) {\n    throw new IllegalArgumentException(\n        \"Expected a ghidra:// URL but got: \" + url);\n}\nlaunchable.setupGhidraURL(url);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["bsim","ghidra","url-validation","command-line","configuration"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}