{"record":{"id":"806dbb3eaf1f4985","repo":"jesseduffield/lazygit","slug":"failed-to-retrieve-version-information","errorCode":null,"errorMessage":"Failed to retrieve version information","messagePattern":"Failed to retrieve version information","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/gui/controllers/helpers/update_helper.go","lineNumber":49,"sourceCode":"\t\tif newVersion == \"\" {\n\t\t\treturn nil\n\t\t}\n\t\tif self.c.UserConfig().Update.Method == \"background\" {\n\t\t\tself.startUpdating(newVersion)\n\t\t\treturn nil\n\t\t}\n\t\treturn self.showUpdatePrompt(newVersion)\n\t}, false)\n}\n\nfunc (self *UpdateHelper) CheckForUpdateInForeground() error {\n\treturn self.c.WithWaitingStatus(self.c.Tr.CheckingForUpdates, func(gocui.Task) error {\n\t\tself.updater.CheckForNewUpdate(func(newVersion string, err error) error {\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif newVersion == \"\" {\n\t\t\t\treturn errors.New(self.c.Tr.FailedToRetrieveLatestVersionErr)\n\t\t\t}\n\t\t\treturn self.showUpdatePrompt(newVersion)\n\t\t}, true)\n\n\t\treturn nil\n\t})\n}\n\nfunc (self *UpdateHelper) startUpdating(newVersion string) {\n\t_ = self.c.WithWaitingStatus(self.c.Tr.UpdateInProgressWaitingStatus, func(gocui.Task) error {\n\t\tself.c.State().SetUpdating(true)\n\t\terr := self.updater.Update(newVersion)\n\t\treturn self.onUpdateFinish(err)\n\t})\n}\n\nfunc (self *UpdateHelper) onUpdateFinish(err error) error {\n\tself.c.State().SetUpdating(false)","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/gui/controllers/helpers/update_helper.go#L31-L67","documentation":"Returned by UpdateHelper.CheckForUpdateInForeground when the version check callback completes without error but reports newVersion == \"\": the updater contacted something (or failed silently) yet obtained no version string, so there is nothing to offer. Distinguished from the background check, which stays quiet on failure — this is the user-initiated 'check for updates' action, so a visible error is required.","triggerScenarios":"Invoking the manual 'check for updates' command; the HTTP request to the release feed is short-circuited (updater disabled or built without updates in some distro builds), the response body is unparseable, or a proxy/ captive portal returns an empty-but-200 result that swallows the real error.","commonSituations":"Distro-packaged lazygit builds where the update endpoint is intentionally disabled; offline or proxied environments; GitHub release feed format changes breaking the parser; DNS rebinding returning empty payloads.","solutions":["Check the actual latest release at the project's releases page and compare with the in-app version (status bar / about).","If installed via package manager, update through it instead (brew upgrade lazygit, apt, etc.).","Verify network egress to the update endpoint (curl the feed URL).","If self-built, rebuild from the latest tag rather than relying on in-app updates."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// before prompting, probe the feed yourself:\n// resp, err := http.Get(releasesURL); if err != nil || body unparseable { skip check }","typeGuard":null,"tryCatchPattern":"if err := updateHelper.CheckForUpdateInForeground(); err != nil {\n    if err.Error() == c.Tr.FailedToRetrieveLatestVersionErr {\n        // fall back to comparing against the releases page / package manager\n    }\n}","preventionTips":["Prefer package-manager updates for distro installs","Verify egress to the release feed in proxied environments"],"tags":["update-check","versioning","network","packaging"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}