{"record":{"id":"8e18d2de40a36d5b","repo":"jlcodes99/cockpit-tools","slug":"app-silent-update-download-failed-retrying-r","errorCode":null,"errorMessage":"[App] Silent update download failed, retrying (${retryIndex}/${totalRetries}) in ${delayMs}ms:","messagePattern":"\\[App\\] Silent update download failed, retrying \\((.+?)/(.+?)\\) in (.+?)ms:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/App.tsx","lineNumber":2487,"sourceCode":"                    } catch (error) {\n                      if (candidate) {\n                        await candidate.close().catch(() => {});\n                      }\n                      throw error;\n                    }\n                  },\n                  {\n                    delaysMs: UPDATE_DOWNLOAD_RETRY_DELAYS_MS,\n                    shouldRetry: isRetryableUpdaterError,\n                    onRetry: ({ retryIndex, totalRetries, delayMs, error }) => {\n                      const compactError = sanitizeUpdaterErrorMessage(error);\n                      setUpdateRetryStatus(\n                        t('update_notification.downloadRetrying', {\n                          attempt: retryIndex,\n                          total: totalRetries,\n                        }),\n                      );\n                      console.warn(\n                        `[App] Silent update download failed, retrying (${retryIndex}/${totalRetries}) in ${delayMs}ms:`,\n                        error,\n                      );\n                      writeUpdateLog(\n                        'warn',\n                        `静默更新下载失败，准备重试(${retryIndex}/${totalRetries})，delay=${delayMs}ms，error=${compactError}`,\n                      );\n                      setUpdateAction((prev) => {\n                        if (prev.state !== 'downloading') {\n                          return prev;\n                        }\n                        return {\n                          ...prev,\n                          progress: 0,\n                        };\n                      });\n                    },\n                  },","sourceCodeStart":2469,"sourceCodeEnd":2505,"githubUrl":"https://github.com/jlcodes99/cockpit-tools/blob/1ed8b77992d62ca81fabf744deb0839ad361d5bf/src/App.tsx#L2469-L2505","documentation":"During silent auto-update, after the installer download fails, App.tsx retries with an exponential delay (delayMs) up to totalRetries times. Each failed attempt logs this warning with the retry counters and the underlying error, and appends a Chinese entry to the update log via writeUpdateLog. It is an expected, self-healing transient — only the final attempt failing escalates to the user.","triggerScenarios":"Tauri updater's download of the release bundle fails mid-attempt: network drop, proxy blocking the update server, CDN 5xx, corrupted partial download, or signature verification failure on the artifact.","commonSituations":"Corporate proxy/firewall blocking the update host, flaky Wi-Fi, GitHub releases rate limiting, expired TLS interception certs, or a bad release published upstream.","solutions":["Wait — the updater retries automatically; check the update log for the final attempt result.","Verify network access to the update server endpoint (proxy/firewall allowlist it).","Read `error` and the update-log entry for the HTTP status (404 = bad release manifest, 5xx = server side).","If all retries fail, download/install the update manually from the releases page."],"exampleFix":"null","handlingStrategy":"retry","validationCode":"// preflight connectivity check before starting silent update\nconst res = await fetch(updateManifestUrl, { method: 'HEAD' });\nif (!res.ok) {\n  writeUpdateLog('warn', `update server unreachable: ${res.status}`);\n  return;\n}\n","typeGuard":"function isUpdaterError(e: unknown): e is { message: string } {\n  return e instanceof Error || (!!e && typeof (e as any).message === 'string');\n}\n","tryCatchPattern":"for (let retryIndex = 1; retryIndex <= totalRetries; retryIndex++) {\n  try {\n    await downloadAndInstall();\n    break;\n  } catch (error) {\n    const delayMs = baseDelay * 2 ** (retryIndex - 1);\n    console.warn(`[App] Silent update download failed, retrying (${retryIndex}/${totalRetries}) in ${delayMs}ms:`, error);\n    if (retryIndex === totalRetries) notifyUserOfUpdateFailure(error);\n    await sleep(delayMs);\n  }\n}","preventionTips":["Allowlist the update server in corporate proxy/firewall settings","Use exponential backoff with a final user-visible failure notification","Log every attempt to the update log for post-mortem diagnosis","Offer a manual 'download update' link as the ultimate fallback"],"tags":["network","updater","retry","tauri"],"backgroundTag":"update-download-failed","analyzedSha":"1ed8b77992d62ca81fabf744deb0839ad361d5bf","analyzedAt":"2026-09-05T09:51:41.178Z","contentChangedAt":"2026-09-05T09:51:41.178Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}