jdx/mise · error
mas install requires a numeric ADAM ID
Error message
mas install requires a numeric ADAM ID ('{p}'); use `mas search` to find it What it means
mas identifies apps by numeric ADAM IDs (Apple's internal app identifiers). install() validates every requested package name with is_adam_id and rejects non-numeric names, telling the user to find the ID with `mas search`. This prevents passing app names like "Xcode" where mas expects "497799835".
Solutions
- Run `mas search <app name>` to get the numeric ADAM ID and use it as the package name.
- Find the numeric id in the App Store web URL (apps.apple.com/app/id<NUMBER>) and use that number.
- Correct the package name in your config/lockfile to the digits-only ID and retry install.
Example fix
// before mas = ["xcode"] // after mas = ["497799835"]
Defensive patterns
Strategy: validation
Validate before calling
fn is_adam_id(name: &str) -> bool { !name.is_empty() && name.chars().all(|c| c.is_ascii_digit()) }
// filter or resolve names to IDs before calling install Type guard
fn is_adam_id(name: &str) -> bool { !name.is_empty() && name.chars().all(|c| c.is_ascii_digit()) } Prevention
- Always record numeric ADAM IDs, never app names, in mas config entries.
- Resolve names with `mas search` once and store the ID.
- Validate mas entries against a digits-only pattern in config linting.
When it happens
Trigger: Calling install() with a PackageRequest whose name is not a numeric ADAM ID (e.g. a human-readable app name or slug); the first offending request is named in the message.
Common situations: Writing mise config with `mas = ["xcode"]` instead of the numeric ID; copying app names from the App Store URL instead of the numeric id in it.
Understand the failure class
Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.
Related errors
- mas upgrade requires a numeric ADAM ID
- global configuration directory must not be a symlink
- mas app IDs must be numeric ADAM IDs (e.g. "mas:497799835")
- mas cannot install a pinned version
- mas install failed
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/ff28292c6592d8c9.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/packages/mas.rs:260
async fn unavailable_reason_async(&self) -> Option<String> {
self.bin().await.err().map(|err| format!("{err:#}"))
}
fn supports_version_pins(&self) -> bool {
false
}
async fn installed(&self, pkgs: &[PackageRequest]) -> Result<Vec<PackageStatus>> {
let apps = mas_list(self.bin().await?).await?;
Ok(statuses_from_apps(&apps, pkgs))
}
async fn install(&self, pkgs: &[PackageRequest], opts: &InstallOpts) -> Result<()> {
if let Some(p) = pkgs.iter().find(|p| p.version.is_some()) {
bail!("mas cannot install a pinned version ('{p}')");
}
if let Some(p) = pkgs.iter().find(|p| !is_adam_id(&p.name)) {
bail!("mas install requires a numeric ADAM ID ('{p}'); use `mas search` to find it");
}
let mut args = vec!["install".to_string()];
args.extend(pkgs.iter().map(|p| p.name.clone()));
if opts.dry_run {
miseprintln!("mas {}", args.join(" "));
return Ok(());
}
debug!("$ mas {}", args.join(" "));
let output = tokio::process::Command::new(self.bin().await?)
.args(&args)
.stdin(Stdio::null())
.output()
.await?;
if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr);
bail!("mas install failed: {}", stderr.trim());
}
Ok(())View on GitHub (pinned to 533346cc37)