wasmerio/wasmer · error
Not logged into registry {host_str}: {e}
Error message
Not logged into registry {host_str}: {e} What it means
After obtaining an authenticated client, `wasmer logout` calls `current_user`; if that GraphQL query itself fails (network error, backend error, invalid token), the error is wrapped as `Not logged into registry {host_str}: {e}` with the underlying cause appended. It distinguishes query failure from the plain no-user case so developers can see why the session check failed.
Source
Thrown at lib/cli/src/commands/auth/logout.rs:44
async fn run_async(self) -> Result<Self::Output, anyhow::Error> {
let registry = self.env.registry_endpoint()?.to_string();
let host_str = self
.env
.registry_public_url()
.map_err(|_| anyhow::anyhow!("No registry not specified!"))?
.host_str()
.unwrap()
.bold();
let client = self
.env
.client()
.map_err(|_| anyhow::anyhow!("Not logged into registry {host_str}"))?;
let user = wasmer_backend_api::query::current_user(&client)
.await
.map_err(|e| anyhow::anyhow!("Not logged into registry {host_str}: {e}"))?
.ok_or_else(|| anyhow::anyhow!("Not logged into registry {host_str}"))?;
let theme = dialoguer::theme::ColorfulTheme::default();
let prompt = dialoguer::Confirm::with_theme(&theme).with_prompt(format!(
"Log user {} out of registry {host_str}?",
user.username
));
if prompt.interact()? || self.non_interactive {
let mut config = self.env.config()?;
let token = config
.registry
.get_login_token_for_registry(®istry)
.unwrap();
config.registry.remove_registry(®istry);
if config.registry.is_current_registry(®istry) {
if config.registry.tokens.is_empty() {
_ = configView on GitHub (pinned to 8c4b9ee9d3)
Solutions
- Read the wrapped `{e}` cause to identify whether it is network or auth related.
- If network-related, restore connectivity / configure proxy settings and retry `wasmer logout`.
- If the token is expired or invalid, remove the stored token (edit ~/.wasmer/wasmer.toml or re-login) and log in again.
- Check the registry's status endpoint if the backend appears down.
Example fix
// before $ wasmer logout // error: Not logged into registry registry.wasmer.io: error sending request: dns error // after: fix connectivity or proxy, then $ wasmer logout
Defensive patterns
Strategy: retry
Validate before calling
# basic reachability probe for the registry GraphQL endpoint before logout
curl -fsS --max-time 5 https://registry.wasmer.io/graphql -X POST \
-H 'content-type: application/json' \
-d '{"query":"{ __typename }"}' > /dev/null && echo reachable Try / catch
// retry transient failures surfaced in the wrapped cause
for attempt in 1..=3 {
match wasmer_backend_api::query::current_user(&client).await {
Ok(_) => break,
Err(e) if attempt < 3 && is_transient(&e) => tokio::time::sleep(Duration::from_secs(2)).await,
Err(e) => anyhow::bail!("cannot verify session on {host}: {e}"),
}
} Prevention
- Verify network/proxy settings before auth operations against the registry.
- Add short retries with backoff for transient GraphQL failures.
- If the cause indicates an invalid token, re-login rather than retrying.
When it happens
Trigger: `wasmer logout` → `current_user(&client)` returns Err: network outage, DNS failure, TLS problems, backend 4xx/5xx, or a rejected/stale token.
Common situations: Being offline or behind a proxy when running logout; registry endpoint temporarily down; stored token expired and rejected with an auth error; firewall blocking the GraphQL endpoint.
Related errors
- The backend did not return any nonce to auth the login!
- No registry not specified!
- Not logged into registry {host_str}
- cron job '{cron_job}' not found
- invalid node type returned
AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01).
Data as JSON: /api/errors/cacbe5469fe2405c.
Report an issue: GitHub.