wasmerio/wasmer · error

invalid app identifier '{s}': expected an app id, but id is

Error message

invalid app identifier '{s}': expected an app id, but id is of type {kind}

What it means

Error "invalid app identifier '{s}': expected an app id, but id is of type {kind}" thrown in wasmerio/wasmer.

Source

Thrown at lib/cli/src/commands/app/util.rs:100

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        if let Some((namespace, name)) = s.split_once('/') {
            if namespace.is_empty() {
                bail!("invalid app identifier '{s}': namespace can not be empty");
            }
            if name.is_empty() {
                bail!("invalid app identifier '{s}': name can not be empty");
            }

            Ok(Self::NamespacedName(
                namespace.to_string(),
                name.to_string(),
            ))
        } else if let Ok(id) = GlobalId::parse_prefixed(s) {
            match id.kind() {
                NodeKind::DeployApp => Ok(Self::AppId(s.to_string())),
                NodeKind::DeployAppVersion => Ok(Self::AppVersionId(s.to_string())),
                _ => {
                    bail!(
                        "invalid app identifier '{s}': expected an app id, but id is of type {kind}",
                        kind = id.kind(),
                    );
                }
            }
        } else {
            Ok(Self::Name(s.to_string()))
        }
    }
}

/// Options for identifying an app.
///
/// Provides convenience methods for resolving an app identifier or loading it
/// from a local app.yaml.
///
/// NOTE: this is a separate struct to prevent the need for copy-pasting the
/// field docs

View on GitHub (pinned to 8c4b9ee9d3)

When it happens

Trigger: Thrown at lib/cli/src/commands/app/util.rs:100 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01). Data as JSON: /api/errors/b4e8ea260f92f8bd. Report an issue: GitHub.