skylot/jadx · error · RuntimeException
Failed to process zip file: {}
Error message
Failed to process zip file: {} What it means
Thrown by ZipReader.visitEntries as a RuntimeException wrapping any exception raised while iterating entries of a zip via open() and applying the visitor. The message includes the absolute file path. Because visitEntries opens the content and iterates, failures can originate from opening the zip or from internal iteration.
Source
Thrown at jadx-commons/jadx-zip/src/main/java/jadx/zip/ZipReader.java:75
// switch to fallback parser
return buildFallbackParser(zipFile).open();
}
}
/**
* Visit valid entries in a zip file.
* Return not null value from visitor to stop iteration.
*/
public <R> @Nullable R visitEntries(File file, Function<IZipEntry, R> visitor) {
try (ZipContent content = open(file)) {
for (IZipEntry entry : content.getEntries()) {
R result = visitor.apply(entry);
if (result != null) {
return result;
}
}
} catch (Exception e) {
throw new RuntimeException("Failed to process zip file: " + file.getAbsolutePath(), e);
}
return null;
}
public void readEntries(File file, BiConsumer<IZipEntry, InputStream> visitor) {
visitEntries(file, entry -> {
if (!entry.isDirectory()) {
try (InputStream in = entry.getInputStream()) {
visitor.accept(entry, in);
} catch (Exception e) {
throw new RuntimeException("Failed to process zip entry: " + entry, e);
}
}
return null;
});
}
public ZipReaderOptions getOptions() {View on GitHub (pinned to e738a26571)
Solutions
- Inspect the wrapped cause for the underlying IOException/security rejection.
- Validate the zip integrity before iterating (unzip -t).
- If a security filter is rejecting entries, review the IJadxZipSecurity configuration.
- Rebuild or re-download the archive if it is corrupt.
Example fix
// before
reader.visitEntries(file, e -> process(e));
// after
if (!isZipValid(file)) throw new IllegalArgumentException("bad zip");
reader.visitEntries(file, e -> process(e)); Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check that the file is a readable zip
public static boolean isReadableZip(File f) {
if (!f.isFile()) return false;
try (java.util.zip.ZipFile zf = new java.util.zip.ZipFile(f)) { return true; }
catch (IOException e) { return false; }
} Try / catch
try {
reader.visitEntries(file, visitor);
} catch (RuntimeException e) {
if (e.getMessage().startsWith("Failed to process zip file")) {
LOG.error("Cannot process zip {}", file.getAbsolutePath(), e.getCause());
// optionally skip this file in a batch
} else throw e;
} Prevention
- Validate archives with unzip -t before batch processing.
- Configure IJadxZipSecurity to expect your archive contents.
- Log per-file failures in batch jobs so one bad file does not abort the run.
When it happens
Trigger: Calling visitEntries(file, visitor) on a file that cannot be opened or whose entries raise during iteration; any exception escaping the try-with-resources on the ZipContent is wrapped here.
Common situations: Corrupt archive that opens but fails mid-iteration; an entry stream read error; a security filter rejecting entries causing an internal throw; I/O error during decompression.
Related errors
- {}
- Failed to open zip: {}
- Failed to process zip entry: {}
- Failed to save JSON file: {}
- Failed to save JSON file: {}
AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14).
Data as JSON: /api/errors/fb9ff220678f100b.
Report an issue: GitHub.