{"record":{"id":"101fe67983b59cfb","repo":"Molunerfinn/PicGo","slug":"failed-to-check-latest-version","errorCode":null,"errorMessage":"Failed to check latest version","messagePattern":"Failed to check latest version","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/renderer/adapters/settings.ts","lineNumber":41,"sourceCode":"  openConfigFile () {\n    sendToMain(PICGO_OPEN_FILE, 'data.json')\n  },\n  openLogFile () {\n    sendToMain(PICGO_OPEN_FILE, 'picgo.log')\n  },\n  openExternalUrl (url: string) {\n    openURL(url)\n  },\n  updateServer () {\n    sendToMain('updateServer')\n  },\n  updateCustomLink () {\n    sendToMain('updateCustomLink')\n  },\n  async checkLatestVersion (includeBeta: boolean) {\n    const result = await invokeRPC<string>(IRPCActionType.GET_LATEST_VERSION, includeBeta)\n    if (!result.success) {\n      throw new Error(result.error || 'Failed to check latest version')\n    }\n\n    return result.data\n  },\n  async loadShortcuts () {\n    const config = await getConfig<IShortKeyConfigs>('settings.shortKey')\n    return config || {}\n  },\n  toggleShortcutModifiedMode (value: boolean) {\n    sendToMain(TOGGLE_SHORTKEY_MODIFIED_MODE, value)\n  },\n  toggleShortcutEnabled (item: IShortKeyConfig) {\n    sendToMain('bindOrUnbindShortKey', item, item.from)\n  },\n  updateShortcut (item: IShortKeyConfig, oldKey: string) {\n    return new Promise<boolean>((resolve, reject) => {\n      const cleanup = ipc.once('updateShortKeyResponse', (result: boolean) => {\n        resolve(result)","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/Molunerfinn/PicGo/blob/07ec7068a5512344da093d49a8408fa63ba3421e/src/renderer/adapters/settings.ts#L23-L59","documentation":"checkLatestVersion throws when the main-process GET_LATEST_VERSION RPC fails. The main handler (src/main/events/rpc/routes/version.ts:8) calls getLatestVersion(type), which performs an outbound HTTPS request to the update feed; a thrown error there is wrapped by fail(e) in rpcInvokeHandler and surfaced in the renderer as this Error. The literal message is the fallback used when result.error is empty.","triggerScenarios":"Calling checkLatestVersion(includeBeta) when the main process cannot reach the update server: network offline, DNS failure, proxy misconfigured, GitHub API rate-limit/HTTP error, or an unhandled exception inside getLatestVersion.","commonSituations":"Corporate proxy or firewall blocking api.github.com; GitHub API rate limiting (403) on shared IPs; offline/bad Wi-Fi; IPv6 issues; user enabled a custom mirror that is down.","solutions":["Check network connectivity and retry; the error is usually transient","Inspect result.error (log it before throwing) to distinguish network failure from rate limiting (403) vs 404","Verify any configured proxy in PicGo settings is reachable and correct","Check the update-feed URL/host used by getLatestVersion is not blocked in your environment"],"exampleFix":"// before\nconst version = await settingsAdapter.checkLatestVersion(includeBeta)\n// after\nlet version: string | null = null\ntry {\n  version = await settingsAdapter.checkLatestVersion(includeBeta)\n} catch (e) {\n  console.warn('Update check skipped:', (e as Error).message)\n}","handlingStrategy":"try-catch","validationCode":"if (typeof navigator.onLine === 'boolean' && !navigator.onLine) {\n  return // skip update check while offline\n}","typeGuard":"function isRPCSuccess<T>(r: { success: boolean; data?: T }): r is { success: true; data: T } {\n  return r.success === true\n}","tryCatchPattern":"try {\n  const version = await checkLatestVersion(includeBeta)\n} catch (e) {\n  logger.warn((e as Error).message)\n  // degrade gracefully: show 'unknown' version instead of failing the UI\n}","preventionTips":["Treat update checks as best-effort; never let them block app startup","Retry with backoff or schedule the next check instead of surfacing an error","Check for corporate proxies/rate limits when the error recurs","Log result.error from the RPC envelope to distinguish offline vs rate-limited"],"tags":["network","ipc","update-check","electron"],"backgroundTag":"network-request-failed","analyzedSha":"07ec7068a5512344da093d49a8408fa63ba3421e","analyzedAt":"2026-08-30T01:45:22.289Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}