{"record":{"id":"6fd0a8a2583ed13d","repo":"Tencent/matrix","slug":"apk-unzip-path-inputpath-is-not-exists-6fd0a8","errorCode":null,"errorMessage":"---APK-UNZIP-PATH '<inputPath>'is not exists!","messagePattern":"---APK-UNZIP-PATH '<inputPath>'is not exists!","errorType":"validation","errorClass":"TaskInitException","httpStatus":null,"severity":"error","filePath":"matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/FindNonAlphaPngTask.java","lineNumber":75,"sourceCode":"    private long downLimitSize;\n    private Map<String, Pair<Long, Long>> entrySizeMap;\n    private Map<String, String> entryNameMap;\n\n    public FindNonAlphaPngTask(JobConfig config, Map<String, String> params) {\n        super(config, params);\n        type = TASK_TYPE_FIND_NON_ALPHA_PNG;\n    }\n\n    @Override\n    public void init() throws TaskInitException {\n        super.init();\n        String inputPath = config.getUnzipPath();\n        if (Util.isNullOrNil(inputPath)) {\n            throw new TaskInitException(TAG + \"---APK-UNZIP-PATH can not be null!\");\n        }\n        inputFile = new File(inputPath);\n        if (!inputFile.exists()) {\n            throw new TaskInitException(TAG + \"---APK-UNZIP-PATH '\" + inputPath + \"'is not exists!\");\n        } else if (!inputFile.isDirectory()) {\n            throw new TaskInitException(TAG + \"---APK-UNZIP-PATH '\" + inputPath + \"' is not directory!\");\n        }\n        if (params.containsKey(JobConstants.PARAM_MIN_SIZE_IN_KB)) {\n            try {\n                downLimitSize = Long.parseLong(params.get(JobConstants.PARAM_MIN_SIZE_IN_KB));\n            } catch (NumberFormatException e) {\n                Log.e(TAG, \"DOWN-LIMIT-SIZE '\" + params.get(JobConstants.PARAM_MIN_SIZE_IN_KB) + \"' is not number format!\");\n            }\n        }\n        nonAlphaPngList = new ArrayList<Pair<String, Long>>();\n        entrySizeMap = config.getEntrySizeMap();\n        entryNameMap = config.getEntryNameMap();\n    }\n\n    private void findNonAlphaPng(File file) throws IOException {\n        if (file != null) {\n            if (file.isDirectory()) {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/Tencent/matrix/blob/3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7/matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/FindNonAlphaPngTask.java#L57-L93","documentation":"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.","triggerScenarios":"config.getUnzipPath() refers to a path that is not present on the filesystem when init() executes.","commonSituations":"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.","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."],"exampleFix":"// before\nconfig.setUnzipPath(\"/tmp/old-build/unzipped\"); // cleaned by CI\n// after\nFile dir = unzipApk(apkFile, \"/tmp/current-build/unzipped\");\nassert dir.exists();\nconfig.setUnzipPath(dir.getAbsolutePath());","handlingStrategy":"validation","validationCode":"File dir = new File(config.getUnzipPath());\nif (!dir.exists() || !dir.isDirectory()) {\n    throw new IllegalStateException(\"unzip path must be an existing directory: \" + dir.getAbsolutePath());\n}","typeGuard":null,"tryCatchPattern":"try {\n    task.init();\n} catch (TaskInitException e) {\n    if (e.getMessage().contains(\"is not exists\")) {\n        unzipApk(apkFile, dir);\n        task.init();\n    }\n}","preventionTips":["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."],"tags":["android","apk-checker","filesystem"],"backgroundTag":"file-not-found","analyzedSha":"3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7","analyzedAt":"2026-09-08T08:01:39.722Z","contentChangedAt":"2026-09-08T08:01:39.722Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}