{"record":{"id":"ebb3e2e42cf552b0","repo":"skylot/jadx","slug":"unsupported-arg-type","errorCode":null,"errorMessage":"Unsupported Arg Type: ","messagePattern":"Unsupported Arg Type: ","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/clsp/ClsSet.java","lineNumber":447,"sourceCode":"\t\t\t\treturn ArgType.generic(clsType, readArgTypesList(in));\n\n\t\t\tcase GENERIC_TYPE_VARIABLE:\n\t\t\t\tString typeVar = readString(in);\n\t\t\t\tList<ArgType> extendTypes = readArgTypesList(in);\n\t\t\t\treturn ArgType.genericType(typeVar, extendTypes);\n\n\t\t\tcase OBJECT:\n\t\t\t\treturn classes[in.readInt()].getClsType();\n\n\t\t\tcase ARRAY:\n\t\t\t\treturn ArgType.array(Objects.requireNonNull(readArgType(in)));\n\n\t\t\tcase PRIMITIVE:\n\t\t\t\tchar shortName = (char) in.readByte();\n\t\t\t\treturn ArgType.parse(shortName);\n\n\t\t\tdefault:\n\t\t\t\tthrow new JadxRuntimeException(\"Unsupported Arg Type: \" + ordinal);\n\t\t}\n\t}\n\n\tprivate static void writeString(DataOutputStream out, String name) throws IOException {\n\t\tbyte[] bytes = name.getBytes(STRING_CHARSET);\n\t\tint len = bytes.length;\n\t\tif (len >= 0xFF) {\n\t\t\tthrow new JadxRuntimeException(\"String is too long: \" + name);\n\t\t}\n\t\twriteUnsignedByte(out, bytes.length);\n\t\tout.write(bytes);\n\t}\n\n\tprivate static String readString(DataInputStream in) throws IOException {\n\t\tint len = readUnsignedByte(in);\n\t\treturn readString(in, len);\n\t}\n","sourceCodeStart":429,"sourceCodeEnd":465,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/clsp/ClsSet.java#L429-L465","documentation":"Thrown by ClsSet.readArgType() when deserializing an ArgType from the binary .clst classpath file. The switch covers all seven TypeEnum values (WILDCARD, GENERIC, GENERIC_TYPE_VARIABLE, OUTER_GENERIC, OBJECT, ARRAY, PRIMITIVE); the default branch is an exhaustive-switch guard. Hitting it means the .clst data stream produced a TypeEnum ordinal outside the known set, which can only happen if the file was written by a newer or incompatible jadx version that added a new TypeEnum constant.","triggerScenarios":"Loading a .clst classpath file (via ClsSet.loadFromClstFile or ClspGraph.loadClsSetFileFile) that was generated by a jadx build with a different TypeEnum. A corrupted or truncated .clst stream where the ordinal byte is read at the wrong offset can also produce an out-of-range enum index.","commonSituations":"Upgrading or downgrading jadx versions where the embedded android.clst resource was regenerated with an extra TypeEnum. Manually swapping the bundled .clst file with one from another jadx release. Running a custom build that modified the TypeEnum enum.","solutions":["Regenerate the .clst classpath file using the same jadx version you are running with (run the ClsSet export/save utility for the matching build).","Ensure the jadx-core JAR and its embedded CLST_PATH resource come from the exact same release — do not mix JARs across versions.","If the file is corrupted, delete the cached/local .clst and let jadx load the bundled one from the classpath resource."],"exampleFix":"// before: mixing versions\n//   jadx-core-1.5.x.jar with .clst from jadx-core-1.4.x\n// after: use matching release\n//   rebuild/re-download the full jadx distribution so core JAR and .clst align","handlingStrategy":"validation","validationCode":"// Validate .clst file before loading\nFile clstFile = new File(path);\nif (!clstFile.exists() || clstFile.length() < MIN_CLST_SIZE) {\n    throw new IllegalArgumentException(\"Invalid or missing .clst file: \" + path);\n}\n// Best prevention: ensure the .clst matches the jadx-core version\nString coreVersion = ClsSet.class.getPackage().getImplementationVersion();\n// Do not mix .clst files across jadx releases","typeGuard":null,"tryCatchPattern":"try {\n    clspGraph.loadClsSetFile();\n} catch (JadxRuntimeException e) {\n    if (e.getMessage().contains(\"Unsupported Arg Type\")) {\n        // Version mismatch — regenerate or use bundled .clst\n        logger.error(\"Classpath file version mismatch. Use the .clst bundled with this jadx release.\", e);\n    }\n    throw e;\n}","preventionTips":["Never mix .clst files from different jadx releases.","When upgrading jadx, delete cached .clst files and let the new version regenerate them.","Pin your jadx version in build scripts to avoid silent upgrades."],"tags":["clsp","serialization","version-mismatch","classpath"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}