jdx/mise · error

user service ' ' is also declared in…

Error message

user service '{}' is also declared in [bootstrap.linux.systemd.units]; declare it once

What it means

requests_from_config found the same service name declared both as a user service and in [bootstrap.linux.systemd.units]. Both declarations would write the same unit file on top of each other, so the duplicate is rejected and mise asks for a single declaration.

Solutions

  1. Delete one of the duplicate declarations
  2. Keep systemd/launchd units in their respective config sections only
  3. Rename one service if both are genuinely needed
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/system/user_services.rs:281 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/a54bf69b3d13cce2. Report an issue: GitHub.

Appendix: source

Thrown at src/system/user_services.rs:281

/// Every user-scope service, validated, with names that collide with
/// `[bootstrap.linux.systemd.units]` or `[bootstrap.macos.launchd.agents]`
/// rejected (both would write the same unit or plist).
pub(crate) fn requests_from_config(config: &Config) -> Result<Vec<UserServiceRequest>> {
    let requests = compose_user_declarations(config)?
        .into_iter()
        .map(|(name, (declaration, origin))| {
            UserServiceRequest::from_toml(name, declaration, Some(origin))
        })
        .collect::<Result<Vec<_>>>()?;
    if requests.is_empty() {
        return Ok(requests);
    }
    let units = crate::system::systemd_from_config(config);
    let agents = crate::system::launchd_from_config(config);
    for request in &requests {
        if units.iter().any(|unit| unit.name == request.name) {
            bail!(
                "user service '{}' is also declared in [bootstrap.linux.systemd.units]; declare it once",
                request.name
            );
        }
        if agents.iter().any(|agent| agent.name == request.name) {
            bail!(
                "user service '{}' is also declared in [bootstrap.macos.launchd.agents]; declare it once",
                request.name
            );
        }
    }
    Ok(requests)
}

/// The mise executable a service definition may reference: the running
/// binary unless it lives in a temporary or remote-bootstrap staging
/// directory, else a `mise` on `PATH` outside those. Durability is judged
/// by where the binary really is, but the path kept is the one found: a

View on GitHub (pinned to 533346cc37)