Tencent/matrix · error · TaskInitException
---APK-UNZIP-PATH ' 'is not exists!
Error message
---APK-UNZIP-PATH '<inputPath>'is not exists!
What it means
Thrown from FindNonAlphaPngTask.init() (as a TaskInitException) when the configured unzip path for the APK under analysis is missing or empty. The task scans PNG entries in the extracted APK directory, so without a valid unzip path it cannot run; this is an input-configuration error in the JobConfig, not a runtime fault.
Solutions
- Confirm the directory exists (`ls <path>`) and fix the --unzip argument or setUnzipPath() value.
- Re-run the unzip step to materialize the directory before check tasks.
- Switch to an absolute path to rule out working-directory differences.
Example fix
// before
config.setUnzipPath("/tmp/old-build/unzipped"); // cleaned by CI
// after
File dir = unzipApk(apkFile, "/tmp/current-build/unzipped");
assert dir.exists();
config.setUnzipPath(dir.getAbsolutePath()); Defensive patterns
Strategy: validation
Validate before calling
File dir = new File(config.getUnzipPath());
if (!dir.exists() || !dir.isDirectory()) {
throw new IllegalStateException("unzip path must be an existing directory: " + dir.getAbsolutePath());
} Try / catch
try {
task.init();
} catch (TaskInitException e) {
if (e.getMessage().contains("is not exists")) {
unzipApk(apkFile, dir);
task.init();
}
} Prevention
- Re-unzip after any `clean` that deletes the extraction directory.
- Use absolute paths for extraction directories in CI.
- Validate path existence immediately before task execution.
When it happens
Trigger: config.getUnzipPath() refers to a path that is not present on the filesystem when init() executes.
Common situations: Stale build directory cleaned before checking; typo in path; unzip step failed or was skipped; running the checker on a different machine than where unzipping happened.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- ---APK-UNZIP-PATH ' 'is not exists!
- ---APK-UNZIP-PATH ' ' is not directory!
- ---APK-UNZIP-PATH ' ' is not directory!
- ---APK-UNZIP-PATH can not be null!
- ---APK-UNZIP-PATH can not be null!
AI-assisted analysis of Tencent/matrix@3b8293bd65 (2026-09-08).
Data as JSON: /api/errors/6fd0a8a2583ed13d.
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:75
private long downLimitSize;
private Map<String, Pair<Long, Long>> entrySizeMap;
private Map<String, String> entryNameMap;
public FindNonAlphaPngTask(JobConfig config, Map<String, String> params) {
super(config, params);
type = TASK_TYPE_FIND_NON_ALPHA_PNG;
}
@Override
public void init() throws TaskInitException {
super.init();
String inputPath = config.getUnzipPath();
if (Util.isNullOrNil(inputPath)) {
throw new TaskInitException(TAG + "---APK-UNZIP-PATH can not be null!");
}
inputFile = new File(inputPath);
if (!inputFile.exists()) {
throw new TaskInitException(TAG + "---APK-UNZIP-PATH '" + inputPath + "'is not exists!");
} else if (!inputFile.isDirectory()) {
throw new TaskInitException(TAG + "---APK-UNZIP-PATH '" + inputPath + "' is not directory!");
}
if (params.containsKey(JobConstants.PARAM_MIN_SIZE_IN_KB)) {
try {
downLimitSize = Long.parseLong(params.get(JobConstants.PARAM_MIN_SIZE_IN_KB));
} catch (NumberFormatException e) {
Log.e(TAG, "DOWN-LIMIT-SIZE '" + params.get(JobConstants.PARAM_MIN_SIZE_IN_KB) + "' is not number format!");
}
}
nonAlphaPngList = new ArrayList<Pair<String, Long>>();
entrySizeMap = config.getEntrySizeMap();
entryNameMap = config.getEntryNameMap();
}
private void findNonAlphaPng(File file) throws IOException {
if (file != null) {
if (file.isDirectory()) {View on GitHub (pinned to 3b8293bd65)