{"record":{"id":"ee9d4307eb34e8b1","repo":"janhq/jan","slug":"no-update-available","errorCode":null,"errorMessage":"No update available","messagePattern":"No update available","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"web-app/src/services/updater/tauri.ts","lineNumber":147,"sourceCode":"    try {\n      const update = await check()\n      if (update) {\n        await update.downloadAndInstall()\n        // Note: Auto-restart happens after installation\n      }\n    } catch (error) {\n      console.error('Error installing update in Tauri:', error)\n      throw error\n    }\n  }\n\n  async downloadAndInstallWithProgress(\n    progressCallback: (event: UpdateProgressEvent) => void\n  ): Promise<void> {\n    try {\n      const update = await check()\n      if (!update) {\n        throw new Error('No update available')\n      }\n\n      // Use Tauri's downloadAndInstall with progress callback\n      await update.downloadAndInstall((event) => {\n        try {\n          // Forward the event to the callback\n          progressCallback(event as UpdateProgressEvent)\n        } catch (callbackError) {\n          console.warn('Error in download progress callback:', callbackError)\n        }\n      })\n    } catch (error) {\n      console.error('Error downloading update with progress in Tauri:', error)\n      throw error\n    }\n  }\n}\n","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/janhq/jan/blob/fad3f12a147d138388a66f0d92a02b2675f65294/web-app/src/services/updater/tauri.ts#L129-L165","documentation":"Thrown by TauriUpdaterService.downloadAndInstallWithProgress when the Tauri updater's check() returns null, i.e. no update is available at the moment the user triggered install. It guards against calling downloadAndInstall() on a null Update object.","triggerScenarios":"User clicks 'download & install with progress' but check() returns null - the app is already on the latest version, or the update was pulled between the last check and the install action.","commonSituations":"User already updated since the last check; update feed rolled back; race between the check UI and the install action; the update endpoint returned no update.","solutions":["Re-run check() immediately before enabling/triggering the install action; disable the control when it returns null.","Surface 'You're up to date' to the user instead of throwing when update is null."],"exampleFix":"// before: throw on null update\nconst update = await check()\nif (!update) throw new Error('No update available')\n// after: treat as a benign no-op\nconst update = await check()\nif (!update) { setUpToDate(true); return }","handlingStrategy":"validation","validationCode":"const update = await check()\nif (!update) { setUpToDate(true); return }","typeGuard":"function hasUpdate(u: Update | null): u is Update { return u !== null }","tryCatchPattern":"try {\n  await updater.downloadAndInstallWithProgress(cb)\n} catch (e) {\n  if (e instanceof Error && e.message === 'No update available') showUpToDate()\n  else throw e\n}","preventionTips":["Re-check for an update immediately before enabling the install action.","Disable the install control when no update is cached."],"tags":["updater","tauri","no-op","user-action"],"backgroundTag":null,"analyzedSha":"fad3f12a147d138388a66f0d92a02b2675f65294","analyzedAt":"2026-08-12T20:33:47.516Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}