matryer/xbar · error
read body
Error message
read body
What it means
Raised in Updater.getLatestRelease when io.ReadAll fails while reading the (size-limited) response body of the GitHub releases response — the connection dropped or was reset mid-body. Without the full body, the release JSON cannot be parsed and update detection fails.
Source
Thrown at pkg/update/update.go:125
time.Sleep(1 * time.Second)
log.Println("terminating after update.")
os.Exit(0)
return nil
}
// getLatestRelease gets the latest release.
func (u *Updater) getLatestRelease() (*Release, error) {
resp, err := u.Client.Get(u.LatestReleaseGitHubEndpoint)
if err != nil {
return nil, errors.Wrap(err, "get latest release")
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return nil, errors.Errorf("failed to check for updates: got %s", resp.Status)
}
b, err := io.ReadAll(io.LimitReader(resp.Body, u.DownloadBytesLimit))
if err != nil {
return nil, errors.Wrap(err, "read body")
}
var latestRelease Release
err = json.Unmarshal(b, &latestRelease)
if err != nil {
return nil, errors.Wrap(err, "marshal")
}
latestRelease.CreatedAt, err = time.Parse(time.RFC3339Nano, latestRelease.CreatedAtString)
if err != nil {
return nil, errors.Wrap(err, "time.Parse: created_at")
}
return &latestRelease, nil
}
// HasUpdate checks whether there's an update or not.
func (u *Updater) HasUpdate() (*Release, bool, error) {
latest, err := u.getLatestRelease()
if err != nil {
return nil, false, errView on GitHub (pinned to d624239058)
Solutions
- Retry the HTTP request, since interrupted connections are usually transient
- Check that DownloadBytesLimit is not set so low it truncates and breaks the read
- Verify network stability (proxies, VPNs, flaky Wi-Fi can reset connections mid-transfer)
- Increase any client-side or proxy timeouts that might abort long reads
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at pkg/update/update.go:125 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of matryer/xbar@d624239058 (2026-09-02).
Data as JSON: /api/errors/7783ca24b16078ea.
Report an issue: GitHub.