xai-org/grok-build · error
no CLI base URLs to try
Error message
no CLI base URLs to try
What it means
install_internal_from_bases iterates over candidate CLI base URLs and keeps the last error; if the bases list is empty (or no attempt was made at all) it returns this fallback error. It indicates the updater had no download locations configured to attempt an install from, so an update is impossible.
Source
Thrown at crates/codegen/xai-grok-update/src/auto_update.rs:1494
// Same published artifact on every base — retrying will not
// change a --version timeout or crash. Left unwrapped so
// telemetry classification sees the typed failure.
return Err(e);
}
Err(e) => {
let e = wrap_download_err(e);
if i + 1 < bases.len() {
tracing::warn!(
"install via {} failed ({:#}); trying next base URL",
base,
e
);
}
last_err = Some(e);
}
}
}
Err(last_err.unwrap_or_else(|| anyhow::anyhow!("no CLI base URLs to try")))
}
/// First-launch of a freshly downloaded macOS binary can exceed 10s (Rosetta
/// AOT + Gatekeeper on ~140MB). A short cap false-fails a good artifact.
const SMOKE_TEST_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(30);
/// Retry budget for exec attempts refused with ETXTBSY. The failure window
/// is normally the microseconds another spawn in this process sits between
/// fork and exec (see [`smoke_test_binary`]), but on a heavily loaded
/// machine that window can stretch, so the budget errs generous — a false
/// "failed to run" both aborts this install and deletes the binary.
const SMOKE_TEST_ETXTBSY_ATTEMPTS: u32 = 8;
const SMOKE_TEST_ETXTBSY_BACKOFF: std::time::Duration = std::time::Duration::from_millis(25);
fn truncate_err(s: &str, max: usize) -> String {
let s = s.trim();
if s.len() <= max {
return s.to_string();View on GitHub (pinned to bc7f02eddd)
Solutions
- Ensure cli_base_urls() returns the standard GCS base URLs (check crate::version config/build settings)
- If calling install_internal_from_bases directly, pass at least one valid base URL
- Reinstall/rebuild the CLI if the built-in URL list appears corrupted
Example fix
// before install_internal_from_bases(&[], channel, ...) // after let bases = crate::version::cli_base_urls(); assert!(!bases.is_empty(), "no CLI base URLs configured"); install_internal_from_bases(&bases.iter().map(String::as_str).collect::<Vec<_>>(), channel, ...)
Defensive patterns
Strategy: validation
Validate before calling
let bases: Vec<String> = crate::version::cli_base_urls();
if bases.is_empty() { anyhow::bail!("refusing to install: no CLI base URLs configured"); } Try / catch
match install_internal_from_bases(&base_refs, channel, &cfg).await {
Err(e) if e.to_string().contains("no CLI base URLs to try") => {
eprintln!("update configuration is broken; reinstall the CLI");
}
result => result?,
} Prevention
- Never pass an empty bases slice to install_internal_from_bases
- Assert cli_base_urls() is non-empty at startup in tests
- Reinstall the CLI if built-in endpoints appear missing
When it happens
Trigger: Calling install_internal_from_bases with an empty bases slice (e.g. crate::version::cli_base_urls() returned an empty vec), or calling it programmatically with an empty list of base URLs.
Common situations: Corrupted or overridden build where the hardcoded GCS base URL list is empty; tests or embedders passing an empty bases vector; a misbuilt binary where version configuration was stripped.
Related errors
- Invalid GCS URL scheme: expected 'gs', got '{}'
- no CLI base URLs configured
- no target specified
- {LOCAL_WORKSPACE_REQUIRES_CHAT}
- No trace upload bucket configured. Set `GROK_TELEMETRY_GCS_B
AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31).
Data as JSON: /api/errors/34fa88399bb8b00a.
Report an issue: GitHub.