{"record":{"id":"cacbe5469fe2405c","repo":"wasmerio/wasmer","slug":"not-logged-into-registry-host-str-e","errorCode":null,"errorMessage":"Not logged into registry {host_str}: {e}","messagePattern":"Not logged into registry (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/cli/src/commands/auth/logout.rs","lineNumber":44,"sourceCode":"\n    async fn run_async(self) -> Result<Self::Output, anyhow::Error> {\n        let registry = self.env.registry_endpoint()?.to_string();\n        let host_str = self\n            .env\n            .registry_public_url()\n            .map_err(|_| anyhow::anyhow!(\"No registry not specified!\"))?\n            .host_str()\n            .unwrap()\n            .bold();\n\n        let client = self\n            .env\n            .client()\n            .map_err(|_| anyhow::anyhow!(\"Not logged into registry {host_str}\"))?;\n\n        let user = wasmer_backend_api::query::current_user(&client)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Not logged into registry {host_str}: {e}\"))?\n            .ok_or_else(|| anyhow::anyhow!(\"Not logged into registry {host_str}\"))?;\n\n        let theme = dialoguer::theme::ColorfulTheme::default();\n        let prompt = dialoguer::Confirm::with_theme(&theme).with_prompt(format!(\n            \"Log user {} out of registry {host_str}?\",\n            user.username\n        ));\n\n        if prompt.interact()? || self.non_interactive {\n            let mut config = self.env.config()?;\n            let token = config\n                .registry\n                .get_login_token_for_registry(&registry)\n                .unwrap();\n            config.registry.remove_registry(&registry);\n            if config.registry.is_current_registry(&registry) {\n                if config.registry.tokens.is_empty() {\n                    _ = config","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/cli/src/commands/auth/logout.rs#L26-L62","documentation":"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.","triggerScenarios":"`wasmer logout` → `current_user(&client)` returns Err: network outage, DNS failure, TLS problems, backend 4xx/5xx, or a rejected/stale token.","commonSituations":"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.","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."],"exampleFix":"// before\n$ wasmer logout\n// error: Not logged into registry registry.wasmer.io: error sending request: dns error\n// after: fix connectivity or proxy, then\n$ wasmer logout","handlingStrategy":"retry","validationCode":"# basic reachability probe for the registry GraphQL endpoint before logout\ncurl -fsS --max-time 5 https://registry.wasmer.io/graphql -X POST \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":\"{ __typename }\"}' > /dev/null && echo reachable","typeGuard":null,"tryCatchPattern":"// retry transient failures surfaced in the wrapped cause\nfor attempt in 1..=3 {\n    match wasmer_backend_api::query::current_user(&client).await {\n        Ok(_) => break,\n        Err(e) if attempt < 3 && is_transient(&e) => tokio::time::sleep(Duration::from_secs(2)).await,\n        Err(e) => anyhow::bail!(\"cannot verify session on {host}: {e}\"),\n    }\n}","preventionTips":["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."],"tags":["auth","logout","network","graphql"],"backgroundTag":"registry-session-check-failed","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}