ipfs/kubo · error

decoding GitHub releases: %w

Error message

decoding GitHub releases: %w

What it means

'ipfs update' fetched the GitHub releases list but the response body did not decode as a JSON array of releases -- typically an HTML error page, a rate-limit response, or a truncated body rather than the expected API payload.

Source

Thrown at core/commands/update_github.go:155

	// Fetch more than needed so we can filter prereleases and still return count results.
	perPage := count
	if !includePre {
		perPage = count * 3
	}
	if perPage > 100 {
		perPage = 100
	}

	url := fmt.Sprintf("%s?per_page=%d", githubReleaseBaseURL(), perPage)
	resp, err := githubGet(ctx, url)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	var all []ghRelease
	if err := json.NewDecoder(resp.Body).Decode(&all); err != nil {
		return nil, fmt.Errorf("decoding GitHub releases: %w", err)
	}

	var filtered []ghRelease
	for _, r := range all {
		if !includePre && r.Prerelease {
			continue
		}
		filtered = append(filtered, r)
		if len(filtered) >= count {
			break
		}
	}
	return filtered, nil
}

// githubReleaseByTag fetches a single release by its git tag.
func githubReleaseByTag(ctx context.Context, tag string) (*ghRelease, error) {
	url := fmt.Sprintf("%s/tags/%s", githubReleaseBaseURL(), tag)

View on GitHub (pinned to 329838acdf)

Solutions

  1. Retry after a while; GitHub API rate limiting is the most common cause
  2. Check network/proxy setup if the error persists
  3. List releases manually at github.com/ipfs/kubo/releases and pin the version explicitly
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at core/commands/update_github.go:155 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03). Data as JSON: /api/errors/989ed55e90c358ee. Report an issue: GitHub.