openai/codex · error
login error page template must parse
Error message
login error page template must parse: {err} What it means
The LazyLock-parsed LOGIN_ERROR_PAGE_TEMPLATE failed to parse the compile-time embedded assets/error.html. Because the template is include_str!'d at build time, this can only fire if the shipped asset is malformed — it is a packaging/build invariant failure, not a runtime input problem.
Solutions
- Report as a bug: the embedded error.html asset is invalid in this build
- Rebuild from a source tree where assets/error.html parses cleanly
- No user-side workaround; the login error page cannot be rendered
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at codex-rs/login/src/server.rs:65 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/6d2ddd1b01c16d1f.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/login/src/server.rs:65
use codex_utils_template::Template;
use rand::RngCore;
use serde_json::Value as JsonValue;
use tiny_http::Header;
use tiny_http::Request;
use tiny_http::Response;
use tiny_http::Server;
use tiny_http::StatusCode;
use tracing::error;
use tracing::info;
use tracing::warn;
pub(super) const DEFAULT_ISSUER: &str = "https://auth.openai.com";
const DEFAULT_PORT: u16 = 1455;
// Keep in sync with the Codex CLI Hydra redirect URI allow-list.
const FALLBACK_PORT: u16 = 1457;
static LOGIN_ERROR_PAGE_TEMPLATE: LazyLock<Template> = LazyLock::new(|| {
Template::parse(include_str!("assets/error.html"))
.unwrap_or_else(|err| panic!("login error page template must parse: {err}"))
});
/// Options for launching the local login callback server.
#[derive(Debug, Clone)]
pub struct ServerOptions {
pub codex_home: PathBuf,
pub client_id: String,
pub issuer: String,
pub port: u16,
pub open_browser: bool,
pub force_state: Option<String>,
pub forced_chatgpt_workspace_id: Option<Vec<String>>,
pub codex_streamlined_login: bool,
pub login_success_page: LoginSuccessPage,
pub cli_auth_credentials_store_mode: AuthCredentialsStoreMode,
pub auth_keyring_backend_kind: AuthKeyringBackendKind,
pub auth_route_config: AuthRouteConfig,
}View on GitHub (pinned to 339751715c)