{"record":{"id":"625ceb5dac16ec82","repo":"aaif-goose/goose","slug":"auto-updater-not-initialized-please-restart-the-a","errorCode":null,"errorMessage":"Auto-updater not initialized. Please restart the application.","messagePattern":"Auto-updater not initialized\\. Please restart the application\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ui/desktop/src/utils/autoUpdater.ts","lineNumber":93,"sourceCode":"    try {\n      log.info('=== MANUAL UPDATE CHECK INITIATED ===');\n      log.info(`Manual check for updates requested at ${new Date().toISOString()}`);\n      log.info(`Current version: ${currentVersion}`);\n      trackUpdateCheckStarted('manual', currentVersion);\n\n      // Reset state for new update check\n      isUsingGitHubFallback = false;\n      githubUpdateInfo = {};\n      lastReportedProgress = 0; // Reset progress tracking\n\n      // Ensure auto-updater is properly initialized\n      if (!autoUpdater.currentVersion) {\n        log.error('Auto-updater currentVersion is null/undefined');\n        trackUpdateCheckCompleted('error', currentVersion, {\n          usingFallback: false,\n          errorType: 'auto_updater_not_initialized',\n        });\n        throw new Error('Auto-updater not initialized. Please restart the application.');\n      }\n\n      log.info(\n        `About to check for updates with currentVersion: ${JSON.stringify(autoUpdater.currentVersion)}`\n      );\n      log.info(`Feed URL: ${autoUpdater.getFeedURL()}`);\n\n      const result = await autoUpdater.checkForUpdates();\n      const duration = Date.now() - checkStartTime;\n      log.info(`=== MANUAL UPDATE CHECK COMPLETED in ${duration}ms ===`);\n      log.info('Auto-updater checkForUpdates result:', result);\n\n      return {\n        updateInfo: result?.updateInfo,\n        error: null,\n      };\n    } catch (error) {\n      const duration = Date.now() - checkStartTime;","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/ui/desktop/src/utils/autoUpdater.ts#L75-L111","documentation":"The 'check-for-updates' IPC handler in the desktop app guards against electron-updater's autoUpdater being uninitialized: currentVersion is null/undefined when the updater never got app metadata (most commonly because the app is not running from a packaged build with app-update.yml, or updater init failed earlier). The handler throws with errorType 'auto_updater_not_initialized' telemetry before calling checkForUpdates.","triggerScenarios":"Running the app via electron . / dev mode where electron-updater has no packaged resources; app-update.yml missing from resources after a broken packaging step; a build config that never calls the updater's feed setup; state corruption after resume-from-disk on some platforms.","commonSituations":"Developers clicking 'Check for updates' in an unpackaged dev build; CI-built artifacts missing the publish config; users on very first launch before autoUpdater finished initializing; Linux portable builds without update metadata.","solutions":["Restart the application as the message suggests — most transient init failures clear on a fresh launch","If it persists, verify you are on a packaged build: dev/unpackaged runs legitimately lack app-update.yml","Reinstall or re-download the release build so resources/app-update.yml ships correctly","Maintainers: confirm electron-builder publish config generated the update metadata for this platform"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Dev-only guard before exposing the check in UI:\nimport { app } from 'electron';\nconst canCheckUpdates = app.isPackaged && Boolean(autoUpdater.currentVersion);\nif (!canCheckUpdates) hideUpdateButton();","typeGuard":"const isUpdaterInitialized = (): boolean => autoUpdater.currentVersion != null;","tryCatchPattern":"// The IPC handler already catches and falls back to githubUpdater; renderer should\n// handle { error } result shape:\nconst res = await window.api.checkForUpdates();\nif (res.error?.includes('not initialized')) {\n  // prompt app restart; do not spam retries\n}","preventionTips":["Only surface update UI in packaged builds","Verify app-update.yml is present in resources during release smoke tests","Treat this as a terminal state: restart, not retry"],"tags":["auto-update","electron-updater","packaging","ipc"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}