jdx/mise · error
mas list failed
Error message
mas list failed: {} What it means
mas_list runs both `mas list --json` and a text-mode `mas list`; if the text invocation exits non-zero, the backend wraps the failure with this prefix. It prefers the text-mode stderr, falling back to the JSON run's captured error/stderr when the text stderr is empty, so the message carries mas's own diagnostic.
Solutions
- Read the detail after the prefix: it contains mas's own stderr (e.g. authentication error) and fix that underlying cause.
- Sign in to the Mac App Store (System Settings → sign in, or `mas signin` on mas versions that support it) and retry.
- Verify network connectivity to Apple's App Store servers and that `mas list` works manually in a shell.
Defensive patterns
Strategy: try-catch
Validate before calling
let status = Command::new("mas").arg("account").output()?;
if !status.status.success() || String::from_utf8_lossy(&status.stdout).contains("not signed in") { /* prompt sign-in before listing */ } Try / catch
match backend.installed(&pkgs, &opts).await {
Ok(apps) => apps,
Err(e) if e.to_string().starts_with("mas list failed:") => { eprintln!("{}", e); /* check sign-in/network then retry */ Vec::new() }
Err(e) => return Err(e),
} Prevention
- Ensure the Mac App Store is signed in before automated mas calls.
- Check network reachability to Apple before batch queries.
- Verify `mas list` works interactively in CI before running automation.
When it happens
Trigger: Calling installed() on the mas backend when either `mas list` invocation exits with a non-zero status — e.g. mas not signed in to the App Store, network failure, or a missing/broken mas binary.
Common situations: Running `mas list` before ever signing into the Mac App Store (`mas account` shows not signed in); offline machine; App Store session expired.
Related errors
- mas install failed
- mas upgrade failed
- nix failed: Nix bootstrap requires modern `nix profile`…
- nix failed; see Nix's diagnostic above. Ensure nix-command…
- pacman -Qi failed
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/903eb4f1b57146a8.
Report an issue: GitHub.
Appendix: 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 533346cc37)