{"record":{"id":"34fa88399bb8b00a","repo":"xai-org/grok-build","slug":"no-cli-base-urls-to-try","errorCode":null,"errorMessage":"no CLI base URLs to try","messagePattern":"no CLI base URLs to try","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-update/src/auto_update.rs","lineNumber":1494,"sourceCode":"                // Same published artifact on every base — retrying will not\n                // change a --version timeout or crash. Left unwrapped so\n                // telemetry classification sees the typed failure.\n                return Err(e);\n            }\n            Err(e) => {\n                let e = wrap_download_err(e);\n                if i + 1 < bases.len() {\n                    tracing::warn!(\n                        \"install via {} failed ({:#}); trying next base URL\",\n                        base,\n                        e\n                    );\n                }\n                last_err = Some(e);\n            }\n        }\n    }\n    Err(last_err.unwrap_or_else(|| anyhow::anyhow!(\"no CLI base URLs to try\")))\n}\n\n/// First-launch of a freshly downloaded macOS binary can exceed 10s (Rosetta\n/// AOT + Gatekeeper on ~140MB). A short cap false-fails a good artifact.\nconst SMOKE_TEST_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(30);\n\n/// Retry budget for exec attempts refused with ETXTBSY. The failure window\n/// is normally the microseconds another spawn in this process sits between\n/// fork and exec (see [`smoke_test_binary`]), but on a heavily loaded\n/// machine that window can stretch, so the budget errs generous — a false\n/// \"failed to run\" both aborts this install and deletes the binary.\nconst SMOKE_TEST_ETXTBSY_ATTEMPTS: u32 = 8;\nconst SMOKE_TEST_ETXTBSY_BACKOFF: std::time::Duration = std::time::Duration::from_millis(25);\n\nfn truncate_err(s: &str, max: usize) -> String {\n    let s = s.trim();\n    if s.len() <= max {\n        return s.to_string();","sourceCodeStart":1476,"sourceCodeEnd":1512,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-update/src/auto_update.rs#L1476-L1512","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\ninstall_internal_from_bases(&[], channel, ...)\n// after\nlet bases = crate::version::cli_base_urls();\nassert!(!bases.is_empty(), \"no CLI base URLs configured\");\ninstall_internal_from_bases(&bases.iter().map(String::as_str).collect::<Vec<_>>(), channel, ...)","handlingStrategy":"validation","validationCode":"let bases: Vec<String> = crate::version::cli_base_urls();\nif bases.is_empty() { anyhow::bail!(\"refusing to install: no CLI base URLs configured\"); }","typeGuard":null,"tryCatchPattern":"match install_internal_from_bases(&base_refs, channel, &cfg).await {\n    Err(e) if e.to_string().contains(\"no CLI base URLs to try\") => {\n        eprintln!(\"update configuration is broken; reinstall the CLI\");\n    }\n    result => result?,\n}","preventionTips":["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"],"tags":["configuration","update","gcs"],"backgroundTag":"missing-base-url-configuration","analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}