{"record":{"id":"be770cc7e4ecfa9b","repo":"MuntashirAkon/AppManager","slug":"invalid-format-ishidden-not-found","errorCode":null,"errorMessage":"Invalid format: isHidden not found","messagePattern":"Invalid format: isHidden not found","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/io/github/muntashirakon/AppManager/rules/struct/MagiskDenyListRule.java","lineNumber":29,"sourceCode":"import io.github.muntashirakon.AppManager.rules.RuleType;\n\npublic class MagiskDenyListRule extends RuleEntry {\n    @NonNull\n    private final MagiskProcess mMagiskProcess;\n\n    public MagiskDenyListRule(@NonNull MagiskProcess magiskProcess) {\n        super(magiskProcess.packageName, magiskProcess.name, RuleType.MAGISK_DENY_LIST);\n        mMagiskProcess = magiskProcess;\n    }\n\n    public MagiskDenyListRule(@NonNull String packageName, @NonNull String processName, @NonNull StringTokenizer tokenizer)\n            throws IllegalArgumentException {\n        super(packageName, processName, RuleType.MAGISK_DENY_LIST);\n        mMagiskProcess = new MagiskProcess(packageName, name);\n        mMagiskProcess.setAppZygote(name.endsWith(\"_zygote\"));\n        if (tokenizer.hasMoreElements()) {\n            mMagiskProcess.setEnabled(Boolean.parseBoolean(tokenizer.nextElement().toString()));\n        } else throw new IllegalArgumentException(\"Invalid format: isHidden not found\");\n        if (tokenizer.hasMoreElements()) {\n            mMagiskProcess.setIsolatedProcess(Boolean.parseBoolean(tokenizer.nextElement().toString()));\n        }\n    }\n\n    public String getProcessName() {\n        return name;\n    }\n\n    @NonNull\n    public MagiskProcess getMagiskProcess() {\n        return mMagiskProcess;\n    }\n\n    @NonNull\n    @Override\n    public String toString() {\n        return \"MagiskDenyListRule{\" +","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/MuntashirAkon/AppManager/blob/0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5/app/src/main/java/io/github/muntashirakon/AppManager/rules/struct/MagiskDenyListRule.java#L11-L47","documentation":"MagiskDenyListRule's constructor reads the isHidden (enabled) boolean token after the package/process tokens. If the tokenizer has no more elements, it throws this IllegalArgumentException because a MAGISK_DENY_LIST rule is incomplete without the isHidden field.","triggerScenarios":"new MagiskDenyListRule(packageName, processName, tokenizer) invoked with a tokenizer that ran out of tokens before the isHidden boolean, i.e. the flattened string lacks the third field.","commonSituations":"Truncated or hand-edited deny-list rule exports, imports of rules from older AppManager versions with fewer fields, or wrong delimiter handling dropping tokens.","solutions":["Ensure the flattened string includes a \"true\"/\"false\" isHidden token after package and process names","Check token count before constructing the rule and reject short strings","Regenerate the rule export from the current AppManager version","Catch IllegalArgumentException during import and skip/report malformed entries"],"exampleFix":"// before\nnew MagiskDenyListRule(pkg, proc, new StringTokenizer(\"com.example\\tcom.example\\tsub\")); // throws\n// after\nnew MagiskDenyListRule(pkg, proc, new StringTokenizer(\"com.example\\tcom.example\\tsub\\tfalse\\tfalse\"));","handlingStrategy":"validation","validationCode":"String[] p = line.split(\"\\t\");\nif (p.length < 3) throw new IllegalArgumentException(\"MAGISK_DENY_LIST rule needs isHidden\");\nBoolean.parseBoolean(p[2]);","typeGuard":"boolean isParsableDenyListRule(String line) { String[] p = line.split(\"\\t\"); return p.length >= 3 && (p[2].equals(\"true\") || p[2].equals(\"false\")); }","tryCatchPattern":"try { new MagiskDenyListRule(pkg, proc, tokenizer); } catch (IllegalArgumentException e) { skipRule(line, e); }","preventionTips":["Confirm the token order: package, process, isHidden, isIsolated","Check tokenizer count before constructing rules from user-supplied files","Re-export rules after AppManager version upgrades to match the current format"],"tags":["rules-parsing","magisk","illegal-argument"],"backgroundTag":"invalid-argument-format","analyzedSha":"0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5","analyzedAt":"2026-09-12T14:03:37.243Z","contentChangedAt":"2026-09-12T14:03:37.243Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}