Tencent/matrix · error · TaskExecuteException
TaskExecuteException wrapping e.getMessage()
Error message
TaskExecuteException wrapping e.getMessage()
What it means
FindNonAlphaPngTask.call() wraps any Exception thrown during PNG scanning into TaskExecuteException with the original e.getMessage(). Common wrapped causes are IOExceptions reading PNG files and NumberFormatException from parsing the DOWN-LIMIT-SIZE param (though the latter is usually caught and logged). This is a generic catch-all at the end of call().
Solutions
- Read the nested exception (cause) and original message to identify the underlying failure.
- Re-unzip the APK to ensure files are complete and readable (`chmod -R u+r <dir>`).
- Check task params: ensure values like MIN-LIMIT-SIZE are valid numbers (in KB).
- Run the task with logging enabled to pinpoint which file caused the failure.
Example fix
// before params.put(JobConstants.PARAM_MIN_SIZE_IN_KB, "ten"); // after params.put(JobConstants.PARAM_MIN_SIZE_IN_KB, "10");
Defensive patterns
Strategy: try-catch
Validate before calling
// validate numeric params before running
String minSize = params.get(JobConstants.PARAM_MIN_SIZE_IN_KB);
if (minSize != null && !minSize.matches("\\d+")) {
throw new IllegalArgumentException("MIN-LIMIT-SIZE must be a number in KB: " + minSize);
} Try / catch
try {
taskResult = findNonAlphaPngTask.call();
} catch (TaskExecuteException e) {
Throwable cause = e.getCause();
log.severe("PNG scan failed: " + e.getMessage() + " cause=" + cause);
// re-unzip / fix perms, then retry once
} Prevention
- Inspect e.getCause() — the message is just the wrapped original.
- Ensure the unzipped APK files are complete and readable (permissions, disk space).
- Pass numeric values for size-related params (KB).
When it happens
Trigger: Any uncaught exception inside call(): file I/O failures while reading PNGs in the unzipped directory, malformed/locked files, or unexpected runtime errors during image parsing.
Common situations: Permission issues reading extracted files; partially unzipped/corrupt APK; param MIN-LIMIT-SIZE given as non-numeric (caught earlier and logged, but downstream issues remain).
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- ---APK-UNZIP-PATH can not be null!
- TaskExecuteException wrapping e.getMessage()
- ---APK-UNZIP-PATH can not be null!
- ---APK-UNZIP-PATH ' 'is not exists!
- ---APK-UNZIP-PATH ' ' is not directory!
AI-assisted analysis of Tencent/matrix@3b8293bd65 (2026-09-08).
Data as JSON: /api/errors/1a3eed54be110341.
Report an issue: GitHub.
Appendix: source
Thrown at matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/FindNonAlphaPngTask.java:162
}
}
});
JsonArray jsonArray = new JsonArray();
for (Pair<String, Long> entry : nonAlphaPngList) {
if (!Util.isNullOrNil(entry.getFirst())) {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("entry-name", entry.getFirst());
jsonObject.addProperty("entry-size", entry.getSecond());
jsonArray.add(jsonObject);
}
}
((TaskJsonResult) taskResult).add("files", jsonArray);
taskResult.setStartTime(startTime);
taskResult.setEndTime(System.currentTimeMillis());
return taskResult;
} catch (Exception e) {
throw new TaskExecuteException(e.getMessage(), e);
}
}
}
View on GitHub (pinned to 3b8293bd65)