jesseduffield/lazygit · warning
Failed to retrieve version information
Error message
Failed to retrieve version information
What it means
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.
Source
Thrown at pkg/gui/controllers/helpers/update_helper.go:49
if newVersion == "" {
return nil
}
if self.c.UserConfig().Update.Method == "background" {
self.startUpdating(newVersion)
return nil
}
return self.showUpdatePrompt(newVersion)
}, false)
}
func (self *UpdateHelper) CheckForUpdateInForeground() error {
return self.c.WithWaitingStatus(self.c.Tr.CheckingForUpdates, func(gocui.Task) error {
self.updater.CheckForNewUpdate(func(newVersion string, err error) error {
if err != nil {
return err
}
if newVersion == "" {
return errors.New(self.c.Tr.FailedToRetrieveLatestVersionErr)
}
return self.showUpdatePrompt(newVersion)
}, true)
return nil
})
}
func (self *UpdateHelper) startUpdating(newVersion string) {
_ = self.c.WithWaitingStatus(self.c.Tr.UpdateInProgressWaitingStatus, func(gocui.Task) error {
self.c.State().SetUpdating(true)
err := self.updater.Update(newVersion)
return self.onUpdateFinish(err)
})
}
func (self *UpdateHelper) onUpdateFinish(err error) error {
self.c.State().SetUpdating(false)View on GitHub (pinned to c477a2959b)
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.
Defensive patterns
Strategy: fallback
Validate before calling
// before prompting, probe the feed yourself:
// resp, err := http.Get(releasesURL); if err != nil || body unparseable { skip check } Try / catch
if err := updateHelper.CheckForUpdateInForeground(); err != nil {
if err.Error() == c.Tr.FailedToRetrieveLatestVersionErr {
// fall back to comparing against the releases page / package manager
}
} Prevention
- Prefer package-manager updates for distro installs
- Verify egress to the release feed in proxied environments
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Password, passphrase and/or username wrong
- Update failed: {{.errMessage}}
- You already have the latest version
- New version ({{.newVersion}}) has non-backwards compatible c
- Could not find any binary at {{.url}}
AI-assisted analysis of jesseduffield/lazygit@c477a2959b (2026-08-15).
Data as JSON: /api/errors/806dbb3eaf1f4985.
Report an issue: GitHub.