jlcodes99/cockpit-tools · warning

[StartupPerf][UpdaterCommand] update_last_check_time failed

Error message

[StartupPerf][UpdaterCommand] update_last_check_time failed in {}ms: {}

What it means

The update_last_check_time command calls update_checker::update_last_check_time() and, on Err, logs '[StartupPerf][UpdaterCommand] update_last_check_time failed in {ms}ms: {err}' before returning the result. It means persisting the 'last update check' timestamp failed, usually a settings/config store write error.

Source

Thrown at src-tauri/src/commands/update.rs:27

    // #1104: respect external-network kill switch for auto update probes.
    if !crate::modules::config::get_user_config().external_network_enabled {
        return Ok(false);
    }
    let settings = update_checker::load_update_settings()?;
    Ok(update_checker::should_check_for_updates(&settings))
}

/// Update the last check time
#[tauri::command]
pub fn update_last_check_time() -> Result<(), String> {
    let started = Instant::now();
    let result = update_checker::update_last_check_time();
    match &result {
        Ok(_) => logger::log_info(&format!(
            "[StartupPerf][UpdaterCommand] update_last_check_time completed in {}ms",
            started.elapsed().as_millis()
        )),
        Err(err) => logger::log_error(&format!(
            "[StartupPerf][UpdaterCommand] update_last_check_time failed in {}ms: {}",
            started.elapsed().as_millis(),
            err
        )),
    }
    result
}

/// Get update settings
#[tauri::command]
pub fn get_update_settings() -> Result<UpdateSettings, String> {
    let started = Instant::now();
    let result = update_checker::load_update_settings();
    match &result {
        Ok(settings) => logger::log_info(&format!(
            "[StartupPerf][UpdaterCommand] get_update_settings completed in {}ms: auto_check={}, auto_install={}, last_check_time={}",
            started.elapsed().as_millis(),
            settings.auto_check,

View on GitHub (pinned to 1ed8b77992)

Solutions

  1. Inspect the inner err after the message for the underlying storage error.
  2. Check write permissions on the update settings/config file location.
  3. Validate/repair or reset the update settings file if it is corrupted JSON.
  4. Retry the command after startup contention subsides (other startup writers finished).
Defensive patterns

Strategy: try-catch

Validate before calling

const settingsOk = await invoke('validate_update_settings_file').catch(() => false);
if (!settingsOk) await invoke('reset_update_settings');

Try / catch

try {
  await invoke('update_last_check_time');
} catch (e) {
  console.warn('last-check-time persist failed; updater will re-check next launch', e);
  // non-fatal: fall back to default check cadence
}

Prevention

When it happens

Trigger: update_checker::update_last_check_time returns Err: the update settings file cannot be read or written (permissions, lock, corruption) or time serialization fails.

Common situations: Config directory read-only; concurrent startup tasks contending for the settings file; corrupted update-settings JSON from a prior crash.

Related errors


AI-assisted analysis of jlcodes99/cockpit-tools@1ed8b77992 (2026-09-05). Data as JSON: /api/errors/3aff21c95a76f2ae. Report an issue: GitHub.