MuntashirAkon/AppManager · error · IllegalArgumentException
Invalid format: ssaid not found
Error message
Invalid format: ssaid not found
What it means
The SsaidRule constructor consumes the ssaid value from the tokenizer after the type token. If no further token exists, it throws IllegalArgumentException("Invalid format: ssaid not found"), since an SSAID rule is meaningless without the ssaid string.
Source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/rules/struct/SsaidRule.java:25
import java.util.Objects;
import java.util.StringTokenizer;
import io.github.muntashirakon.AppManager.rules.RuleType;
public class SsaidRule extends RuleEntry {
@NonNull
private String mSsaid;
public SsaidRule(@NonNull String packageName, @NonNull String ssaid) {
super(packageName, STUB, RuleType.SSAID);
mSsaid = ssaid;
}
public SsaidRule(@NonNull String packageName, @NonNull StringTokenizer tokenizer) {
super(packageName, STUB, RuleType.SSAID);
if (tokenizer.hasMoreElements()) {
mSsaid = tokenizer.nextElement().toString();
} else throw new IllegalArgumentException("Invalid format: ssaid not found");
}
@NonNull
public String getSsaid() {
return mSsaid;
}
public void setSsaid(@NonNull String ssaid) {
mSsaid = ssaid;
}
@NonNull
@Override
public String toString() {
return "SsaidRule{" +
"packageName='" + packageName + '\'' +
", ssaid='" + mSsaid + '\'' +
'}';View on GitHub (pinned to 0152f468fc)
Solutions
- Add the missing ssaid token to the rule line ("pkg\tSTUB\tSSAID\t<ssaid>").
- Skip such lines during import with a pre-check that at least 4 tokens exist for SSAID rules.
- Re-export the rules from the source device/app.
Example fix
// before String line = pkg + "\tSTUB\tSSAID"; RuleEntry e = RuleEntry.unflattenFromString(null, line, false); // after String line = pkg + "\tSTUB\tSSAID\t" + ssaid; RuleEntry e = RuleEntry.unflattenFromString(null, line, false);
Defensive patterns
Strategy: validation
Validate before calling
String[] p = line.split("\t", -1);
boolean ok = p.length >= 3 && "SSAID".equals(p[2]) ? p.length >= 4 : true;
// only parse when ok Try / catch
try {
RuleEntry e = RuleEntry.unflattenFromString(null, line, false);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("ssaid not found")) repairOrSkip(line);
} Prevention
- Always serialize SSAID rules with all four fields.
- Round-trip test: flattenToString then unflattenFromString each rule after export.
When it happens
Trigger: Parsing a rule line of the form "pkg\tSTUB\tSSAID" with no fourth tab-separated token carrying the ssaid value via RuleEntry.unflattenFromString.
Common situations: Truncated export files; manual editing that dropped the last column; copy/paste losing the trailing tab field.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Invalid format: entryType not found
- Invalid format: uriGrant not found
- Invalid format: mode not found
- Invalid format: enabled not found
- Invalid format: componentStatus not found
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/759cdd7690294cdf.
Report an issue: GitHub.