{"record":{"id":"109257accf80b9f4","repo":"NationalSecurityAgency/ghidra","slug":"no-signature-files-found-in","errorCode":null,"errorMessage":"No signature files found in {}","messagePattern":"No signature files found in (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java","lineNumber":187,"sourceCode":"\t\tErrorHandler handler = SpecXmlUtils.getXmlHandler();\n\t\tXmlPullParser parser = new NonThreadedXmlPullParserImpl(file, handler, false);\n\t\tmanage.restoreXml(parser, querydb.getLSHVectorFactory());\n\t}\n\n\tprotected void sendXmlToQueryServer(File dir, URL ghidraOverrideURL, String filter,\n\t\t\tTaskMonitor monitor)\n\t\t\tthrows IOException, SAXException, LSHException, CancelledException {\n\t\testablishQueryServerConnection(true);\n\t\tif (filter == null) {\n\t\t\tfilter = \"sigs_\";\n\t\t}\n\t\telse {\n\t\t\tfilter = \"sigs_\" + filter;\n\t\t}\n\t\tList<File> files = gatherXml(filter, dir);\n\n\t\tif (files.isEmpty()) {\n\t\t\tthrow new IOException(\"No signature files found in \" + dir.getAbsolutePath());\n\t\t}\n\n\t\tmonitor.setMessage(\"Writing signatures\");\n\t\tmonitor.setMaximum(files.size());\n\n\t\tfor (File file : files) {\n\t\t\tmonitor.checkCancelled();\n\t\t\tmonitor.incrementProgress(1);\n\t\t\tMsg.info(this, \"Writing signatures for \" + file.getName());\n\t\t\tInsertRequest insertreq = new InsertRequest();\n\t\t\tif (ghidraOverrideURL != null) {\n\t\t\t\tinsertreq.repo_override =\n\t\t\t\t\tGhidraURL.getProjectURL(ghidraOverrideURL).toExternalForm();\n\t\t\t\tinsertreq.path_override = GhidraURL.getProjectPathname(ghidraOverrideURL);\n\t\t\t}\n\t\t\tloadSignatureXml(file, insertreq.manage);\n\t\t\tif (insertreq.manage.numFunctions() == 0) {\n\t\t\t\tMsg.warn(this, file.getName() + \": does not define any functions\");","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java#L169-L205","documentation":"Thrown by BulkSignatures.sendSignaturesToServer after gatherXml returns an empty list, i.e. no files matching the 'sigs_<filter>' prefix were found in the given directory. The directory was readable but contained no signature files to ingest, so the operation aborts rather than silently doing nothing.","triggerScenarios":"Running ingest (sendSignaturesToServer) against a directory that has no files starting with the expected prefix; generatesigs output written elsewhere or to a different prefix; filter argument mismatches generated names.","commonSituations":"Forgetting to run 'generatesigs' first; pointing ingest at the wrong output folder; the filter token does not match the prefix used during generation; files were moved/deleted.","solutions":["Run signature generation first so the directory contains sigs_* files.","Point sendSignaturesToServer at the directory that actually holds the generated sigs_* files.","If using a custom filter, ensure the generation and ingest prefixes agree (filter is prepended with 'sigs_')."],"exampleFix":"// before\nbsim.sendSignaturesToServer(new File(\"out\"), \"exe1\", monitor);  // no sigs_exe1_* files\n\n// after\n// generate with matching filter, then ingest\nbsim.sendSignaturesToServer(new File(\"out\"), null, monitor);  // or correct filter token","handlingStrategy":"validation","validationCode":"File dir = new File(path);\nString prefix = (filter == null ? \"sigs_\" : \"sigs_\" + filter);\nFile[] matches = dir.listFiles((d, n) -> n.startsWith(prefix));\nif (matches == null || matches.length == 0) {\n    throw new IOException(\"No \" + prefix + \"* files in \" + dir);\n}","typeGuard":null,"tryCatchPattern":"try {\n    bsim.sendSignaturesToServer(dir, filter, monitor);\n} catch (IOException e) {\n    if (e.getMessage().startsWith(\"No signature files found\")) {\n        // generate sigs first, then retry\n    } else { throw e; }\n}","preventionTips":["Run generatesigs before ingest so the directory holds sigs_* files.","Keep the generation filter and ingest filter consistent.","Point ingest at the actual output directory."],"tags":["bsim","ingest","missing-files","ioexception"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}