Tencent/matrix · error · TaskExecuteException

e.getMessage()

Error message

e.getMessage()

What it means

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.

Solutions

  1. Inspect the wrapped cause (e.getCause()) — the message alone is often null or unhelpful.
  2. Log full stack traces of the cause to identify whether it's an I/O or process error.
  3. Verify the nm tool runs manually on one of the APK's .so files.
  4. Ensure the job thread is not interrupted (check executor shutdown handling).

Example fix

// before
catch (Exception e) { throw new TaskExecuteException(e.getMessage(), e); }
// after (caller-side)
catch (TaskExecuteException e) {
    Throwable cause = e.getCause();
    log.error("UnStrippedSoCheckTask failed", cause);
}
Defensive patterns

Strategy: try-catch

Try / catch

try {
    taskResult = task.call();
} catch (TaskExecuteException e) {
    Throwable cause = e.getCause();
    if (cause instanceof IOException) {
        log.error("I/O failure in UnStrippedSoCheckTask", cause);
    } else if (cause instanceof InterruptedException) {
        Thread.currentThread().interrupt();
    } else {
        log.error("Task failed: {}", e.getMessage(), cause);
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: nm binary incompatible with the OS (wrong prebuilt arch); .so files unreadable/corrupt in the unzipped APK; thread interrupted during CI shutdown.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of Tencent/matrix@3b8293bd65 (2026-09-08). Data as JSON: /api/errors/51b38828b35a518f. Report an issue: GitHub.

Appendix: source

Thrown at matrix/matrix-android/matrix-apk-canary/src/main/java/com/tencent/matrix/apk/model/task/UnStrippedSoCheckTask.java:147

                                libFiles.add(libFile);
                            }
                        }
                    }
                }
            }
            for (File libFile : libFiles) {
                if (!isSoStripped(libFile)) {
                    Log.i(TAG, "lib: %s is not stripped", libFile.getName());

                    jsonArray.add(libFile.getName());
                }
            }
            ((TaskJsonResult) taskResult).add("unstripped-lib", jsonArray);
            taskResult.setStartTime(startTime);
            taskResult.setEndTime(System.currentTimeMillis());
            return taskResult;
        } catch (Exception e) {
            throw new TaskExecuteException(e.getMessage(), e);
        }
    }
}

View on GitHub (pinned to 3b8293bd65)