skylot/jadx · error · RuntimeException

Failed to decompress zip entry: {}, error: {}

Error message

Failed to decompress zip entry: {}, error: {}

What it means

Thrown in entryParseFailed() when decompression fails, the entry is NOT encrypted, and the caller has set ZipReaderFlags.DONT_USE_FALLBACK. In the default configuration jadx would instead log a warning and transparently retry the entry with the fallback parser; the DONT_USE_FALLBACK flag converts that soft recovery into a hard RuntimeException that chains the underlying cause (typically DataFormatException).

Source

Thrown at jadx-commons/jadx-zip/src/main/java/jadx/zip/parser/JadxZipParser.java:358

	private static void verifyEntry(JadxZipEntry entry) {
		int compressMethod = entry.getCompressMethod();
		if (compressMethod == 0) {
			if (entry.getCompressedSize() != entry.getUncompressedSize()) {
				LOG.warn("Not equal sizes for STORE method: compressed: {}, uncompressed: {}, entry: {}",
						entry.getCompressedSize(), entry.getUncompressedSize(), entry);
			}
		} else if (compressMethod != 8) {
			LOG.warn("Unknown compress method: {} in entry: {}", compressMethod, entry);
		}
	}

	private void entryParseFailed(JadxZipEntry entry, Exception e) {
		if (isEncrypted(entry)) {
			throw new RuntimeException("Entry is encrypted, failed to decompress: " + entry, e);
		}
		if (flags.contains(ZipReaderFlags.DONT_USE_FALLBACK)) {
			throw new RuntimeException("Failed to decompress zip entry: " + entry + ", error: " + e.getMessage(), e);
		}
		LOG.warn("Entry '{}' parse failed, switching to fallback parser", entry, e);
	}

	@SuppressWarnings("resource")
	private IZipEntry useFallbackParser(JadxZipEntry entry) {
		LOG.debug("useFallbackParser used for {}", entry);
		IZipEntry zipEntry = initFallbackParser().searchEntry(entry.getName());
		if (zipEntry == null) {
			throw new RuntimeException("Fallback parser can't find entry: " + entry);
		}
		return zipEntry;
	}

	@SuppressWarnings("resource")
	private synchronized ZipContent initFallbackParser() {
		if (fallbackZipContent == null) {
			try {

View on GitHub (pinned to e738a26571)

Solutions

  1. Remove ZipReaderFlags.DONT_USE_FALLBACK to let jadx retry the entry with the fallback parser.
  2. Inspect getCause() (usually DataFormatException) to determine if the compressed payload is truncated or corrupt.
  3. Re-acquire the archive from a trusted source and retry.
  4. If the archive is intentionally malformed for testing, expect this error and handle it.

Example fix

// before
ZipReaderOptions opts = new ZipReaderOptions(security, EnumSet.of(ZipReaderFlags.DONT_USE_FALLBACK));

// after
ZipReaderOptions opts = new ZipReaderOptions(security, ZipReaderFlags.none());
Defensive patterns

Strategy: fallback

Validate before calling

// The error only occurs when DONT_USE_FALLBACK is set. Prefer the default:
Set<ZipReaderFlags> flags = ZipReaderFlags.none(); // do NOT add DONT_USE_FALLBACK

Try / catch

try {
    content = new JadxZipParser(file, strictOpts).open();
} catch (RuntimeException e) {
    if (e.getMessage().contains("Failed to decompress zip entry")) {
        // retry with fallback enabled
        strictOpts = new ZipReaderOptions(security, ZipReaderFlags.none());
        content = new JadxZipParser(file, strictOpts).open();
    } else throw e;
}

Prevention

When it happens

Trigger: Decompressing an entry whose data does not inflate correctly (corrupt compressed payload, mismatched compression method, partial write) while DONT_USE_FALLBACK is in the ZipReaderOptions flags.

Common situations: Strict CI pipelines or library integrations that disable the fallback to get deterministic behavior, run against a partially corrupt archive; an obfuscator that emits entries the custom parser misreads; a zip produced by a non-standard packer.

Related errors


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