jdx/mise · error
mas list failed: {}
Error message
mas list failed: {} What it means
mas_list runs `mas list` (text and JSON passes) and bails when the mas subprocess exits non-zero, reporting the most informative stderr: the text-mode stderr if non-empty, otherwise the JSON-mode stderr. It aggregates the failure of either invocation into one error.
Source
Thrown at src/system/packages/mas.rs:211
Some(err.to_string())
}
}
} else {
None
};
debug!("$ mas list");
let text_output = tokio::process::Command::new(mas)
.arg("list")
.stdin(Stdio::null())
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
.await?;
if !text_output.status.success() {
let json_stderr = String::from_utf8_lossy(&json_output.stderr);
let text_stderr = String::from_utf8_lossy(&text_output.stderr);
bail!(
"mas list failed: {}",
if text_stderr.trim().is_empty() {
json_err.as_deref().unwrap_or_else(|| json_stderr.trim())
} else {
text_stderr.trim()
}
);
}
let stdout = String::from_utf8_lossy(&text_output.stdout);
Ok(parse_mas_text(&stdout))
}
#[async_trait(?Send)]
impl SystemPackageManager for MasManager {
fn name(&self) -> &str {
"mas"
}
View on GitHub (pinned to afd2eddd3a)
Solutions
- Run `mas list` in a terminal to see the underlying error directly
- Sign in to the Mac App Store (`mas signin` or the App Store app) — a missing session is the most common cause
- Ensure macOS is up to date; old mas releases fail against newer App Store daemons
- Check network connectivity to Apple App Store endpoints
Defensive patterns
Strategy: try-catch
Validate before calling
mas account 2>&1 || echo "not signed in to Mac App Store"
Try / catch
match mas_list(bin).await {
Ok(apps) => apps,
Err(e) if e.to_string().contains("mas list failed") => {
eprintln!("App Store unavailable or not signed in: {e}");
Vec::new()
}
Err(e) => return Err(e),
} Prevention
- Sign in to the Mac App Store before running package syncs
- Check `mas account` in CI/automation before invoking mas-dependent providers
- Keep macOS and mas current; stale mas builds fail against new daemons
When it happens
Trigger: The `mas list` subprocess returns a non-zero exit status — e.g. mas not signed in to the Mac App Store, App Store daemon unavailable, or mas binary failing to launch its JSON or text listing pass.
Common situations: Running mise on a fresh macOS box before `mas account` sign-in; App Store servers unreachable; corporate network blocking Apple endpoints; mas CLI crashed due to an outdated macOS version.
Related errors
- mas install failed: {}
- mas upgrade failed: {}
- mas app IDs must be numeric ADAM IDs (e.g. "mas:497799835")
- mas list --json returned an app object without an ID and ver
- mas install requires a numeric ADAM ID ('{p}'); use `mas sea
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/903eb4f1b57146a8.
Report an issue: GitHub.