{"record":{"id":"51b38828b35a518f","repo":"Tencent/matrix","slug":"e-getmessage-51b388","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/UnStrippedSoCheckTask.java","lineNumber":147,"sourceCode":"                                libFiles.add(libFile);\n                            }\n                        }\n                    }\n                }\n            }\n            for (File libFile : libFiles) {\n                if (!isSoStripped(libFile)) {\n                    Log.i(TAG, \"lib: %s is not stripped\", libFile.getName());\n\n                    jsonArray.add(libFile.getName());\n                }\n            }\n            ((TaskJsonResult) taskResult).add(\"unstripped-lib\", 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":129,"sourceCodeEnd":151,"githubUrl":"https://github.com/Tencent/matrix/blob/3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7/matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/UnStrippedSoCheckTask.java#L129-L151","documentation":"UnStrippedSoCheckTask.call() wraps ANY exception thrown during task execution into a TaskExecuteException whose message is e.getMessage() (possibly null). This is a generic execution failure wrapper, so the real cause is the wrapped exception.","triggerScenarios":"Any failure inside call(): nm process failing to start or returning nonzero, IOException reading .so files, InterruptedException while waiting for the process, or JSON result building errors.","commonSituations":"nm binary incompatible with the OS (wrong prebuilt arch); .so files unreadable/corrupt in the unzipped APK; thread interrupted during CI shutdown.","solutions":["Inspect the wrapped cause (e.getCause()) — the message alone is often null or unhelpful.","Log full stack traces of the cause to identify whether it's an I/O or process error.","Verify the nm tool runs manually on one of the APK's .so files.","Ensure the job thread is not interrupted (check executor shutdown handling)."],"exampleFix":"// before\ncatch (Exception e) { throw new TaskExecuteException(e.getMessage(), e); }\n// after (caller-side)\ncatch (TaskExecuteException e) {\n    Throwable cause = e.getCause();\n    log.error(\"UnStrippedSoCheckTask failed\", 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 IOException) {\n        log.error(\"I/O failure in UnStrippedSoCheckTask\", cause);\n    } else if (cause instanceof InterruptedException) {\n        Thread.currentThread().interrupt();\n    } else {\n        log.error(\"Task failed: {}\", e.getMessage(), cause);\n    }\n}","preventionTips":["Always inspect getCause(); the wrapper message may be null.","Test the nm tool manually on a sample .so before CI runs.","Handle executor shutdown to avoid spurious InterruptedExceptions.","Keep the unzipped APK readable for the job user."],"tags":["android","apk-canary","exception-wrapper","process"],"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"}