skylot/jadx · error · RuntimeException

Failed to process zip entry: {}

Error message

Failed to process zip entry: {}

What it means

Thrown inside ZipReader.readEntries' visitor lambda as a RuntimeException wrapping any exception raised while reading a single zip entry's input stream. It fires per-entry: the entry is opened, the visitor BiConsumer is invoked with the InputStream, and any exception there is wrapped with the entry's toString.

Source

Thrown at jadx-commons/jadx-zip/src/main/java/jadx/zip/ZipReader.java:86

			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() {
		return options;
	}

	private IZipParser detectParser(File zipFile, JadxZipParser jadxParser) throws IOException {
		if (zipFile.getName().endsWith(".apk")
				|| options.getFlags().contains(ZipReaderFlags.DONT_USE_FALLBACK)) {
			return jadxParser;
		}
		if (!jadxParser.canOpen()) {
			return buildFallbackParser(zipFile);
		}

View on GitHub (pinned to e738a26571)

Solutions

  1. Inspect the wrapped cause and the entry name in the message.
  2. Skip or quarantine the failing entry if the rest of the archive is valid.
  3. Verify CRCs (unzip -t) to confirm a corrupt entry.
  4. Handle per-entry failures in the visitor with try-catch to continue processing others.

Example fix

// before
reader.readEntries(file, (entry, in) -> parse(in));
// after
reader.readEntries(file, (entry, in) -> {
    try { parse(in); }
    catch (Exception e) { LOG.warn("skip bad entry {}", entry, e); }
});
Defensive patterns

Strategy: try-catch

Try / catch

// Make your visitor resilient per-entry
reader.readEntries(file, (entry, in) -> {
    try {
        handleEntry(entry, in);
    } catch (Exception ex) {
        LOG.warn("Skipping bad entry {} in {}", entry, file.getName(), ex);
    }
});

// Or catch at the readEntries boundary
try {
    reader.readEntries(file, this::handleEntry);
} catch (RuntimeException e) {
    if (e.getMessage().startsWith("Failed to process zip entry")) {
        LOG.warn("Bad entry encountered: {}", e.getCause().toString());
    } else throw e;
}

Prevention

When it happens

Trigger: A specific entry's InputStream cannot be read (corrupt entry, decompression error, malformed data), or the visitor itself throws while processing the entry's bytes. Only non-directory entries reach this branch.

Common situations: One corrupted entry inside an otherwise valid archive; a decompression bomb or CRC mismatch; visitor code that fails parsing a particular entry's content; an entry using an unsupported compression method.

Related errors


AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14). Data as JSON: /api/errors/bbe9d930eb2ee2a1. Report an issue: GitHub.