{"record":{"id":"ee9d4307eb34e8b1","repo":"janhq/jan","slug":"no-update-available","errorCode":null,"errorMessage":"No update available","messagePattern":"No update available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","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/7205d770c1e097c3daf35a911176410e93bc5564/web-app/src/services/updater/tauri.ts#L129-L165","documentation":"downloadAndInstallWithProgress calls the Tauri updater's check(); when it returns null/undefined (no applicable update), the method throws 'No update available'. check() returns nothing when the app version already satisfies the latest published version in the update manifest (or updates are disabled).","triggerScenarios":"check() from @tauri-apps/plugin-updater resolves falsy and the user/code still requests downloadAndInstallWithProgress; e.g. clicking 'Update now' when the app is already on the latest version.","commonSituations":"Update button shown from stale UI state after an update already installed and restarted; updater endpoint manifest not bumped, so check() sees no newer version; version comparison considers the installed build up to date (e.g. same or higher version string); updater plugin misconfigured with a wrong endpoint so it resolves empty.","solutions":["Call check() first and only offer the update button when an update exists; treat this throw as 'already up to date'.","Verify the updater endpoint (latest.json) actually advertises a version higher than the installed one.","Confirm the updater plugin endpoint/signature config in tauri.conf.json is correct.","Catch the error and show 'You are on the latest version' instead of failing."],"exampleFix":"// before\nawait updater.downloadAndInstallWithProgress(cb)\n// after\nconst update = await check(); if (!update) { showToast('Already up to date'); return } await updater.downloadAndInstallWithProgress(cb)","handlingStrategy":"try-catch","validationCode":"const update = await check()\nif (!update) { /* already up to date */ return }","typeGuard":null,"tryCatchPattern":"try {\n  await updater.downloadAndInstallWithProgress(cb)\n} catch (e) {\n  if (e instanceof Error && e.message === 'No update available') {\n    showToast('You are already on the latest version')\n  }\n}","preventionTips":["Only render the update button after check() returns an update object.","Clear update-available UI state after install/restart.","Keep the updater manifest version strictly ahead of installed builds."],"tags":["updater","tauri","no-update","versioning"],"backgroundTag":"empty-result-set","analyzedSha":"7205d770c1e097c3daf35a911176410e93bc5564","analyzedAt":"2026-09-17T14:27:30.100Z","contentChangedAt":"2026-09-17T14:27:30.100Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}