Tencent/matrix · error · TaskInitException
TAG + "---APK-UNZIP-PATH can not be null!"
Error message
TAG + "---APK-UNZIP-PATH can not be null!"
What it means
Thrown from ShowFileSizeTask.init() when the unzip path configured in the JobConfig is null or empty. The task enumerates and sorts file sizes inside the extracted APK directory, so a missing path is a configuration error raised as TaskInitException before execution.
Solutions
- Set the APK unzip path in the JobConfig (e.g. -input parameter) before running
- Ensure config.getUnzipPath() is populated by the unpack step
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/ShowFileSizeTask.java:70 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/matrix@3b8293bd65 (2026-09-08).
Data as JSON: /api/errors/0408ac9eb40e01c6.
Report an issue: GitHub.
Appendix: source
Thrown at matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/ShowFileSizeTask.java:70
private static final String TAG = "Matrix.ShowFileSizeTask";
private File inputFile;
private String order = JobConstants.ORDER_DESC;
private long downLimit;
private Set<String> filterSuffix;
private List<Pair<String, Long>> entryList;
public ShowFileSizeTask(JobConfig jobConfig, Map<String, String> params) {
super(jobConfig, params);
type = TASK_TYPE_SHOW_FILE_SIZE;
}
@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!");
}
Log.i(TAG, "inputPath:%s", inputPath);
inputFile = new File(inputPath);
if (!inputFile.exists()) {
throw new TaskInitException(TAG + "---APK-UNZIP-PATH '" + inputPath + "' is not exist!");
} 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 {
downLimit = 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!");
}
}
if (params.containsKey(JobConstants.PARAM_ORDER)) {
if (JobConstants.ORDER_ASC.equals(params.get(JobConstants.PARAM_ORDER))) {View on GitHub (pinned to 3b8293bd65)