DioxusLabs/dioxus · error · anyhow::Error

Notarization requires either: - APPLE_ID, APPLE_PASSWORD, an

Error message

Notarization requires either:
- APPLE_ID, APPLE_PASSWORD, and APPLE_TEAM_ID env vars, or
- APPLE_API_KEY, APPLE_API_ISSUER, and APPLE_API_KEY_PATH env vars

What it means

The notarization step found neither a complete App ID credential set (APPLE_ID+APPLE_PASSWORD+APPLE_TEAM_ID) nor a complete API key set (APPLE_API_KEY+APPLE_API_ISSUER+APPLE_API_KEY_PATH) in the environment. `xcrun notarytool submit` requires one full set, so the step bails listing both options.

Source

Thrown at packages/cli/src/bundler/macos.rs:877

    let apple_team_id = std::env::var("APPLE_TEAM_ID").ok();
    let api_key = std::env::var("APPLE_API_KEY").ok();
    let api_issuer = std::env::var("APPLE_API_ISSUER").ok();
    let api_key_path = std::env::var("APPLE_API_KEY_PATH").ok();

    let mut cmd = Command::new("xcrun");
    cmd.args(["notarytool", "submit"]);
    cmd.arg(notarize_path);

    if let (Some(key), Some(issuer), Some(key_path)) = (&api_key, &api_issuer, &api_key_path) {
        cmd.args(["--key", key_path]);
        cmd.args(["--key-id", key]);
        cmd.args(["--issuer", issuer]);
    } else if let (Some(id), Some(pwd), Some(team)) = (&apple_id, &apple_password, &apple_team_id) {
        cmd.args(["--apple-id", id]);
        cmd.args(["--password", pwd]);
        cmd.args(["--team-id", team]);
    } else {
        bail!(
            "Notarization requires either:\n\
             - APPLE_ID, APPLE_PASSWORD, and APPLE_TEAM_ID env vars, or\n\
             - APPLE_API_KEY, APPLE_API_ISSUER, and APPLE_API_KEY_PATH env vars"
        );
    }

    cmd.arg("--wait");

    tracing::info!("Submitting {} for notarization...", notarize_path.display());
    run_command(&mut cmd, "xcrun notarytool submit").await?;

    tracing::info!("Stapling notarization ticket...");
    let mut staple_cmd = Command::new("xcrun");
    staple_cmd.args(["stapler", "staple"]).arg(staple_path);
    run_command(&mut staple_cmd, "xcrun stapler staple").await?;

    tracing::info!("Notarization complete for {}", staple_path.display());
    Ok(())

View on GitHub (pinned to 24f6a829df)

Solutions

  1. Set the notarization credentials: either APPLE_ID, APPLE_PASSWORD, and APPLE_TEAM_ID, or APPLE_API_KEY, APPLE_API_ISSUER, and APPLE_API_KEY_PATH.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/cli/src/bundler/macos.rs:877 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23). Data as JSON: /api/errors/63a71866c3aae348. Report an issue: GitHub.