skylot/jadx · error · JadxRuntimeException
Unknown var type for: {}
Error message
Unknown var type for: {} What it means
Thrown by MethodInvokeVisitor.getCompilerVarType() when an InsnArg is not one of the three handled subtypes: LiteralArg, RegisterArg, or InsnWrapArg. The method tries to determine the 'compiler type' of an argument for cast resolution; encountering an unrecognised argument subclass means a new instruction-arg type was introduced that this method does not yet handle.
Source
Thrown at jadx-core/src/main/java/jadx/core/dex/visitors/MethodInvokeVisitor.java:425
if (literalArg.getLiteral() == 0) {
if (type.isObject() || type.isArray()) {
// null
return ArgType.UNKNOWN_OBJECT;
}
}
if (type.isPrimitive() && !arg.contains(AFlag.EXPLICIT_PRIMITIVE_TYPE)) {
return ArgType.INT;
}
return arg.getType();
}
if (arg instanceof RegisterArg) {
return arg.getType();
}
if (arg instanceof InsnWrapArg) {
InsnWrapArg wrapArg = (InsnWrapArg) arg;
return getInsnCompilerType(arg, wrapArg.getWrapInsn());
}
throw new JadxRuntimeException("Unknown var type for: " + arg);
}
private static ArgType getInsnCompilerType(InsnArg arg, InsnNode insn) {
switch (insn.getType()) {
case CAST:
case CHECK_CAST:
return ((IndexInsnNode) insn).getIndexAsType();
default:
if (insn.getResult() != null) {
return insn.getResult().getType();
}
return arg.getType();
}
}
}
View on GitHub (pinned to e738a26571)
Solutions
- Upgrade jadx (or if already on latest, check if this is a known regression and downgrade).
- Catch JadxRuntimeException per class/method and continue.
- Report the issue with the InsnArg class name and toString() from the error message — this is likely a jadx bug.
- Try disabling the MethodInvokeVisitor or related invoke-processing passes.
Defensive patterns
Strategy: try-catch
Try / catch
try {
javaClass.decompile();
} catch (JadxRuntimeException e) {
LOG.warn("Unknown arg type in {}: {}", javaClass.getName(), e.getMessage());
} Prevention
- Upgrade jadx or check for regressions — this is likely an internal bug.
- Isolate per-class with try-catch.
- Report the InsnArg subclass name from the error to the jadx project.
- Try disabling MethodInvokeVisitor or related passes via settings.
When it happens
Trigger: getCompilerVarType(arg) is called for an argument during invoke-visitor processing. The arg fails all instanceof checks (not LiteralArg, not RegisterArg, not InsnWrapArg) and falls through to the throw. This indicates an unexpected InsnArg subclass in the argument position.
Common situations: Usually a jadx internal issue — a new InsnArg variant was produced by a visitor but getCompilerVarType was not updated. Rare for end users; would typically appear after a jadx upgrade that introduces a new arg type. Can surface with unusual instruction combinations.
Related errors
- Null arg type in {} at: {} in: {}
- Invalid args count in insn: {}
- Null array element type
- Bad name for type variable: {}
- Can't parse type: {}, unexpected: {}
AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14).
Data as JSON: /api/errors/348d8f5f9decf09b.
Report an issue: GitHub.