jlcodes99/cockpit-tools · info

[App] Silent update check failed, retrying (${retryIndex}/${

Error message

[App] Silent update check failed, retrying (${retryIndex}/${totalRetries}) in ${delayMs}ms:

What it means

The silent (automatic) update check runs runUpdaterCheck through a retry helper; onRetry receives the failed attempt and logs this warning before scheduling the next attempt after delayMs. It indicates a transient updater failure, not a final one — the check will keep retrying per UPDATE_CHECK_RETRY_DELAYS_MS until attempts are exhausted.

Source

Thrown at src/App.tsx:2346

        );

        writeUpdateLog('info', '启动检查立即执行');

        if (autoInstall && !isLinuxManagedUpdate) {
          // Silent update: check and download in background, install on restart
          console.log('[App] Auto-install enabled, attempting silent update...');
          writeUpdateLog('info', '后台自动更新已开启,尝试静默检查并下载');
          let preparedUpdateInfo: UpdateInfo | null = null;
          try {
            const silentCheckStartedAt = performance.now();
            const update = await retryWithBackoff(
              async () => runUpdaterCheck(),
              {
                delaysMs: UPDATE_CHECK_RETRY_DELAYS_MS,
                shouldRetry: isRetryableUpdaterError,
                onRetry: ({ retryIndex, totalRetries, delayMs, error }) => {
                  const compactError = sanitizeUpdaterErrorMessage(error);
                  console.warn(
                    `[App] Silent update check failed, retrying (${retryIndex}/${totalRetries}) in ${delayMs}ms:`,
                    error,
                  );
                  writeUpdateLog(
                    'warn',
                    `静默更新检查失败,准备重试(${retryIndex}/${totalRetries}),delay=${delayMs}ms,error=${compactError}`,
                  );
                },
              },
            );
            console.log(
              `[StartupPerf][UpdateCheck] silent runUpdaterCheck completed in ${(performance.now() - silentCheckStartedAt).toFixed(2)}ms; hasUpdate=${Boolean(update)}`,
            );
            if (update) {
              if (skippedVersion && update.version === skippedVersion) {
                console.log('[App] Update skipped by user, ignoring:', update.version);
                writeUpdateLog('info', `检测到新版本但已跳过: version=${update.version}`);
                await closeUpdaterHandle(update);

View on GitHub (pinned to 1ed8b77992)

Solutions

  1. Nothing to fix if a later retry succeeds — this is informational; check the subsequent update log entries for final outcome
  2. Verify network/proxy access to the update manifest URL from the affected machine
  3. Compare the sanitized error (compactError in writeUpdateLog) against known retryable categories to find the root cause
  4. If retries exhaust, surface a manual 'check for updates' action and consider increasing retry delays

Example fix

// before
shouldRetry: isRetryableUpdaterError,
// after
shouldRetry: isRetryableUpdaterError,
delaysMs: navigator.onLine === false ? [] : UPDATE_CHECK_RETRY_DELAYS_MS, // skip retries when offline
Defensive patterns

Strategy: retry

Validate before calling

if (typeof navigator !== 'undefined' && navigator.onLine === false) {
  // skip update check entirely; retries cannot succeed offline
  return;
}

Type guard

function isRetryableUpdaterError(e: unknown): boolean {
  const msg = e instanceof Error ? e.message : String(e);
  return /timeout|network|ECONN|5\d\d|temporarily/i.test(msg);
}

Try / catch

try {
  await retryWithDelay(() => runUpdaterCheck(), {
    delaysMs: UPDATE_CHECK_RETRY_DELAYS_MS,
    shouldRetry: isRetryableUpdaterError,
    onRetry: ({ retryIndex, totalRetries, delayMs, error }) => {
      console.warn(`[App] Silent update check failed, retrying (${retryIndex}/${totalRetries}) in ${delayMs}ms:`, error);
    },
  });
} catch (finalError) {
  writeUpdateLog('error', sanitizeUpdaterErrorMessage(finalError));
}

Prevention

When it happens

Trigger: runUpdaterCheck() rejects with an error for which isRetryableUpdaterError returns true (network timeouts, DNS failures, 5xx from the update server, proxy errors) during the background silent update check.

Common situations: Offline or flaky network at app start; corporate proxy/firewall blocking the update endpoint; update server returning 503; TLS interception certificates.

Related errors


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