{"record":{"id":"0ce237b22b7306fa","repo":"Tencent/matrix","slug":"e-getmessage-0ce237","errorCode":null,"errorMessage":"e.getMessage()","messagePattern":"e\\.getMessage\\(\\)","errorType":"exception","errorClass":"TaskExecuteException","httpStatus":null,"severity":"error","filePath":"matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/UncompressedFileTask.java","lineNumber":138,"sourceCode":"                        Log.d(TAG, \"file: %s, filter by suffix.\", entry.getKey());\n                    }\n                }\n            }\n\n            for (String suffix : uncompressSizeMap.keySet()) {\n                if (uncompressSizeMap.get(suffix).equals(compressSizeMap.get(suffix))) {\n                    JsonObject fileItem = new JsonObject();\n                    fileItem.addProperty(\"suffix\", suffix);\n                    fileItem.addProperty(\"total-size\", uncompressSizeMap.get(suffix));\n                    jsonArray.add(fileItem);\n                }\n            }\n            ((TaskJsonResult) taskResult).add(\"files\", jsonArray);\n            taskResult.setStartTime(startTime);\n            taskResult.setEndTime(System.currentTimeMillis());\n            return taskResult;\n        } catch (Exception e) {\n            throw new TaskExecuteException(e.getMessage(), e);\n        }\n    }\n}\n","sourceCodeStart":120,"sourceCodeEnd":142,"githubUrl":"https://github.com/Tencent/matrix/blob/3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7/matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/UncompressedFileTask.java#L120-L142","documentation":"UncompressedFileTask.call() wraps any exception raised while scanning the APK for uncompressed entries into a TaskExecuteException with message e.getMessage(). It is a generic wrapper; the actionable information is in the cause.","triggerScenarios":"IOException opening/reading the APK (corrupt or truncated file), ZipException on a non-zip file, or errors building the JSON result.","commonSituations":"Pointing at a partially downloaded/corrupt APK; APK replaced on disk mid-run; file permission problems in CI workspaces.","solutions":["Check e.getCause() for the real failure and its stack trace.","Validate the APK opens as a zip (e.g. unzip -t app.apk) before running.","Rebuild/re-download the APK if corrupt.","Check file read permissions for the user running matrix."],"exampleFix":"// before\ncatch (Exception e) { log.warn(e.getMessage()); }\n// after\ncatch (TaskExecuteException e) {\n    Throwable cause = e.getCause();\n    log.error(\"UncompressedFileTask failed: \" + e.getMessage(), cause);\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    taskResult = task.call();\n} catch (TaskExecuteException e) {\n    Throwable cause = e.getCause();\n    if (cause instanceof ZipException || cause instanceof IOException) {\n        log.error(\"APK unreadable/corrupt: {}\", cause.getMessage(), cause);\n    } else {\n        log.error(\"UncompressedFileTask failed\", cause);\n    }\n}","preventionTips":["Sanity-check the APK with `unzip -t` before analysis.","Avoid mutating/deleting the APK while the task runs.","Confirm workspace file permissions for the CI user.","Retain the original cause stack traces in logs."],"tags":["android","apk-canary","exception-wrapper","zip"],"backgroundTag":"internal-invariant-violation","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"}