alibaba/arthas · error · IllegalArgumentException

Unsupported action: ${ttAction}. Supported actions: record(t

Error message

Unsupported action: ${ttAction}. Supported actions: record(t), list(l), info(i), search(s), replay(p), delete(d), deleteAll(da)

What it means

Defensive fallback in the main command-building switch of TimeTunnelTool. In normal flow this is unreachable because validateParameters (called at line 66, before this switch) already rejects unknown actions at line 138 with the same kind of message. It exists as a safety net against logic gaps between validateParameters and the switch cases.

Source

Thrown at core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TimeTunnelTool.java:96

                cmd = buildListCommand(cmd, searchExpression);
                break;
            case "info":
                cmd.append(" -i ").append(index);
                break;
            case "search":
                cmd.append(" -s '").append(searchExpression.trim()).append("'");
                break;
            case "replay":
                cmd.append(" -i ").append(index).append(" -p");
                break;
            case "delete":
                cmd.append(" -i ").append(index).append(" -d");
                break;
            case "deleteall":
                cmd.append(" --delete-all");
                break;
            default:
                throw new IllegalArgumentException("Unsupported action: " + ttAction +
                        ". Supported actions: record(t), list(l), info(i), search(s), replay(p), delete(d), deleteAll(da)");
        }

        return executeStreamable(toolContext, cmd.toString(), execCount, DEFAULT_POLL_INTERVAL_MS, timeoutSeconds * 1000,
                "TimeTunnel recording completed successfully");
    }

    /**
     * 验证参数
     */
    private void validateParameters(String action, String classPattern, String methodPattern, 
                                   Integer index, String searchExpression) {
        switch (action) {
            case "record":
                if (classPattern == null || classPattern.trim().isEmpty()) {
                    throw new IllegalArgumentException("classPattern is required for record operation");
                }
                if (methodPattern == null || methodPattern.trim().isEmpty()) {

View on GitHub (pinned to 21cf2e9ba5)

Solutions

  1. Use a valid tt action: record, list, info, search, replay, delete, or deleteAll (plus their aliases t/l/i/s/p/d/da).
  2. The earlier validation error at line 138 (error 115) will normally fire first with a clearer message.
  3. Report as an internal bug if this specific line is reached.
Defensive patterns

Strategy: validation

Validate before calling

// This line is defensively unreachable; validate action before calling tt
Set<String> valid = Set.of("record","list","info","search","replay","delete","deleteall");
if (!valid.contains(normalizedAction)) {
    throw new IllegalArgumentException("Unsupported tt action: " + normalizedAction);
}

Try / catch

// Normally unreachable via the public API.
// validateParameters (error 115) catches unknown actions first.
try {
    String result = timeTunnel(action, ...);
} catch (IllegalArgumentException e) {
    // any 'Unsupported action' from tt indicates an invalid action value
}

Prevention

When it happens

Trigger: Cannot be reached through the public timeTunnel entry point under normal control flow. Would require bypassing validateParameters or a future code change that desynchronizes the two switch statements.

Common situations: Dead-code guard. Encountering it indicates an internal bug where validateParameters and the main switch disagree on the set of valid actions.

Related errors


AI-assisted analysis of alibaba/arthas@21cf2e9ba5 (2026-08-14). Data as JSON: /api/errors/4e4dd1308be1b94d. Report an issue: GitHub.