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

  1. Run `mas list` in a terminal to see the underlying error directly
  2. Sign in to the Mac App Store (`mas signin` or the App Store app) — a missing session is the most common cause
  3. Ensure macOS is up to date; old mas releases fail against newer App Store daemons
  4. 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

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


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/903eb4f1b57146a8. Report an issue: GitHub.