{"record":{"id":"7ea5da6d371754e7","repo":"skylot/jadx","slug":"fallback-parser-can-t-find-entry","errorCode":null,"errorMessage":"Fallback parser can't find entry: {}","messagePattern":"Fallback parser can't find entry: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-commons/jadx-zip/src/main/java/jadx/zip/parser/JadxZipParser.java","lineNumber":368,"sourceCode":"\t\t}\n\t}\n\n\tprivate void entryParseFailed(JadxZipEntry entry, Exception e) {\n\t\tif (isEncrypted(entry)) {\n\t\t\tthrow new RuntimeException(\"Entry is encrypted, failed to decompress: \" + entry, e);\n\t\t}\n\t\tif (flags.contains(ZipReaderFlags.DONT_USE_FALLBACK)) {\n\t\t\tthrow new RuntimeException(\"Failed to decompress zip entry: \" + entry + \", error: \" + e.getMessage(), e);\n\t\t}\n\t\tLOG.warn(\"Entry '{}' parse failed, switching to fallback parser\", entry, e);\n\t}\n\n\t@SuppressWarnings(\"resource\")\n\tprivate IZipEntry useFallbackParser(JadxZipEntry entry) {\n\t\tLOG.debug(\"useFallbackParser used for {}\", entry);\n\t\tIZipEntry zipEntry = initFallbackParser().searchEntry(entry.getName());\n\t\tif (zipEntry == null) {\n\t\t\tthrow new RuntimeException(\"Fallback parser can't find entry: \" + entry);\n\t\t}\n\t\treturn zipEntry;\n\t}\n\n\t@SuppressWarnings(\"resource\")\n\tprivate synchronized ZipContent initFallbackParser() {\n\t\tif (fallbackZipContent == null) {\n\t\t\ttry {\n\t\t\t\tfallbackZipContent = new FallbackZipParser(zipFile, options).open();\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(\"Fallback parser failed to open file: \" + zipFile, e);\n\t\t\t}\n\t\t}\n\t\treturn fallbackZipContent;\n\t}\n\n\tprivate boolean isEncrypted(JadxZipEntry entry) {\n\t\tint flags = readFlags(entry);","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-commons/jadx-zip/src/main/java/jadx/zip/parser/JadxZipParser.java#L350-L386","documentation":"Thrown by useFallbackParser() when, after the custom parser failed on an entry and jadx transparently delegated to the fallback parser, the fallback parser's searchEntry() returns null for the same entry name. This indicates an internal inconsistency: the primary parser knew about the entry but the fallback (which enumerates via Java's ZipFile) cannot locate it. The entry name is included in the message.","triggerScenarios":"Decompression of an entry fails in the custom parser, DONT_USE_FALLBACK is NOT set, so useFallbackParser runs, and initFallbackParser().searchEntry(entry.getName()) returns null.","commonSituations":"A tampered zip where the central directory (read by the custom parser) lists an entry that the local-file-header enumeration (used by the fallback) cannot find, or vice versa; case-sensitivity or path-normalization differences between the two parsers; an archive edited after creation that broke local/central directory consistency.","solutions":["Inspect the entry name for unusual characters, case, or path separators that the two parsers might normalize differently.","Repackage the archive with a standard zip tool to restore local/central directory consistency.","Enable DONT_USE_FALLBACK if you want the original decompression error surfaced instead of this secondary lookup failure.","Treat the archive as untrusted and re-acquire it."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    zipEntry = useFallbackFor(entry);\n} catch (RuntimeException e) {\n    if (e.getMessage().contains(\"can't find entry\")) {\n        LOG.warn(\"Entry {} missing from fallback parser, skipping\", entry.getName());\n        continue;\n    }\n    throw e;\n}","preventionTips":["Repackage archives with a standard tool to keep local/central directories consistent.","Watch for case/path differences in entry names between parsers.","Enable DONT_USE_FALLBACK if you prefer the original decompression error over this lookup mismatch."],"tags":["zip","fallback-parser","inconsistent-archive","internal"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}