wasmerio/wasmer · error · anyhow::Error

No owner specified: use --owner <owner>

Error message

No owner specified: use --owner <owner>

What it means

During `wasmer app create`, get_owner resolves the owner from --owner or an interactive prompt (listing the user's namespaces). In non-interactive mode it cannot prompt, so it bails demanding an explicit owner. The library throws it because app ownership must be explicit in automation.

Source

Thrown at lib/cli/src/commands/app/create.rs:216

                    .and_then(|f| f.to_str())
                    .map(|s| s.to_owned())
            }),
        };

        crate::utils::prompts::prompt_for_app_ident(
            "What should be the name of the app?",
            default_name.as_deref(),
        )
    }

    async fn get_owner(&self, client: Option<&WasmerClient>) -> anyhow::Result<String> {
        if let Some(owner) = &self.owner {
            return Ok(owner.clone());
        }

        if self.non_interactive {
            // if not interactive we can't prompt the user to choose the owner of the app.
            anyhow::bail!("No owner specified: use --owner <owner>");
        }

        let user = if let Some(client) = client {
            Some(wasmer_backend_api::query::current_user_with_namespaces(client, None).await?)
        } else {
            None
        };
        crate::utils::prompts::prompt_for_namespace("Who should own this app?", None, user.as_ref())
    }

    async fn get_output_dir(&self, app_name: &str) -> anyhow::Result<PathBuf> {
        let mut output_path = if let Some(path) = &self.app_dir_path {
            path.clone()
        } else {
            PathBuf::from(".").canonicalize()?
        };

        if output_path.is_dir() && output_path.read_dir()?.next().is_some() {

View on GitHub (pinned to 8c4b9ee9d3)

Solutions

  1. Add --owner <owner> (your username or a namespace/org) to the command.
  2. Ensure you are logged in so the default user could be resolved, and still pass --owner for determinism.
  3. Remove --non-interactive to let the CLI prompt for the owner.

Example fix

// before
// wasmer app create --non-interactive --name my-app
// after
// wasmer app create --non-interactive --name my-app --owner my-org
Defensive patterns

Strategy: validation

Validate before calling

if process.env.CI || !process.stdin.isTTY {
  if (!args.owner) throw new Error('owner required in non-interactive mode');
}

Type guard

fn has_owner(args: &CreateArgs) -> bool {
    args.owner.as_deref().map(|s| !s.trim().is_empty()).unwrap_or(false)
}

Try / catch

match result {
    Err(e) if e.to_string().contains("No owner specified") => {
        eprintln!("re-run with --owner <owner>");
        std::process::exit(2);
    }
    other => other?,
}

Prevention

When it happens

Trigger: Running `wasmer app create --non-interactive` without --owner, so neither a flag value nor a prompt can supply the owner.

Common situations: CI/CD deployments, scripts, or machines with no TTY where the login account has multiple namespaces and no --owner was given.

Related errors


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