{"record":{"id":"934a3e899baf8b4e","repo":"skylot/jadx","slug":"unsupported-type-for-raw-invoke-custom","errorCode":null,"errorMessage":"Unsupported type for raw invoke-custom: {}","messagePattern":"Unsupported type for raw invoke-custom: (.+?)","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"error","filePath":"jadx-core/src/main/java/jadx/core/utils/EncodedValueUtils.java","lineNumber":101,"sourceCode":"\t\t\tcase ENCODED_INT:\n\t\t\tcase ENCODED_LONG:\n\t\t\tcase ENCODED_FLOAT:\n\t\t\tcase ENCODED_DOUBLE:\n\t\t\t\treturn (InsnArg) convertToConstValue(value);\n\n\t\t\tcase ENCODED_BOOLEAN:\n\t\t\t\treturn InsnArg.lit(((Boolean) obj) ? 0 : 1, ArgType.BOOLEAN);\n\t\t\tcase ENCODED_STRING:\n\t\t\t\treturn InsnArg.wrapArg(new ConstStringNode((String) obj));\n\t\t\tcase ENCODED_TYPE:\n\t\t\t\treturn InsnArg.wrapArg(new ConstClassNode(ArgType.parse((String) obj)));\n\t\t\tcase ENCODED_METHOD_TYPE:\n\t\t\t\treturn InsnArg.wrapArg(buildMethodType(root, (IMethodProto) obj));\n\t\t\tcase ENCODED_METHOD_HANDLE:\n\t\t\t\treturn InsnArg.wrapArg(buildMethodHandle(root, (IMethodHandle) obj));\n\n\t\t}\n\t\tthrow new JadxRuntimeException(\"Unsupported type for raw invoke-custom: \" + value.getType());\n\t}\n\n\tprivate static InvokeNode buildMethodType(RootNode root, IMethodProto methodProto) {\n\t\tArgType retType = ArgType.parse(methodProto.getReturnType());\n\t\tList<ArgType> argTypes = Utils.collectionMap(methodProto.getArgTypes(), ArgType::parse);\n\t\tList<ArgType> callTypes = new ArrayList<>(1 + argTypes.size());\n\t\tcallTypes.add(retType);\n\t\tcallTypes.addAll(argTypes);\n\t\tArgType mthType = ArgType.object(\"java.lang.invoke.MethodType\");\n\t\tClassInfo cls = ClassInfo.fromType(root, mthType);\n\t\tMethodInfo mth = MethodInfo.fromDetails(root, cls, \"methodType\", callTypes, mthType);\n\t\tInvokeNode invoke = new InvokeNode(mth, InvokeType.STATIC, callTypes.size());\n\t\tfor (ArgType type : callTypes) {\n\t\t\tInsnNode argInsn;\n\t\t\tif (type.isPrimitive()) {\n\t\t\t\targInsn = new IndexInsnNode(InsnType.SGET, getTypeField(root, type.getPrimitiveType()), 0);\n\t\t\t} else {\n\t\t\t\targInsn = new ConstClassNode(type);","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/utils/EncodedValueUtils.java#L83-L119","documentation":"Thrown by EncodedValueUtils.convertToInsnArg when an invoke-custom bootstrap-method argument has an EncodedValue type not handled by the switch - i.e. something other than the primitives, STRING, TYPE, METHOD_TYPE, or METHOD_HANDLE (for example ENCODED_ARRAY, ENCODED_ANNOTATION, ENCODED_ENUM, ENCODED_FIELD, ENCODED_METHOD, or a new encoded type). invoke-custom args that are arrays/annotations/enum/field/method references are not yet converted to InsnArg form.","triggerScenarios":"Decompiling a class whose invoke-custom (LambdaMetafactory or custom bootstrap) declares a bootstrap argument that is an array, annotation, enum, field, or method encoded value. convertToInsnArg exhausts its switch cases and falls through to the throw.","commonSituations":"Apps that use non-LambdaMetafactory bootstraps with rich bootstrap arguments (e.g. string-dedup or constant-dynamic style), bytecode from newer DEX tooling, or hand-crafted invoke-custom instructions. Common bytecode (lambdas) only uses METHOD_TYPE/METHOD_HANDLE/TYPE/STRING and never hits this.","solutions":["Update jadx; encoded-value handling for invoke-custom is expanded over releases.","Report the input and the encoded type from the message so the missing case can be added.","Skip the affected class and continue the batch.","Catch JadxRuntimeException around decompilation when using jadx as a library."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    InsnArg arg = EncodedValueUtils.convertToInsnArg(root, value);\n} catch (JadxRuntimeException e) {\n    LOG.warn(\"unsupported invoke-custom encoded type {}\", value.getType(), e);\n}","preventionTips":["Update jadx for new encoded-value types.","Catch around convertToInsnArg so one unsupported bootstrap arg degrades to a warn comment.","Report the encoded type from the message so the missing case can be added."],"tags":["decompiler","invoke-custom","encoded-value","lambdas","unsupported-feature"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}