ipfs/kubo · error

downloading asset: %w

Error message

downloading asset: %w

What it means

Fired by downloadAsset when the HTTP GET of a release asset's browser_download_url (GitHub CDN) fails at the request-construction or transport stage. It wraps the underlying error during the kubo self-update binary download; no auth headers are involved since the CDN URL is public.

Source

Thrown at core/commands/update_github.go:220

	}

	return nil, nil, fmt.Errorf(
		"release %s exists but has no binary for %s/%s yet; build artifacts may still be uploading, try again in a few hours",
		tag, runtime.GOOS, runtime.GOARCH)
}

// downloadAsset downloads a release asset by its browser_download_url.
// This hits GitHub's CDN directly, not the API, so no auth headers are needed.
func downloadAsset(ctx context.Context, url string) ([]byte, error) {
	req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
	if err != nil {
		return nil, err
	}
	req.Header.Set("User-Agent", "kubo/"+version.CurrentVersionNumber)

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		return nil, fmt.Errorf("downloading asset: %w", err)
	}
	defer resp.Body.Close()

	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("download returned HTTP %d", resp.StatusCode)
	}

	data, err := io.ReadAll(io.LimitReader(resp.Body, maxDownloadSize+1))
	if err != nil {
		return nil, fmt.Errorf("reading download: %w", err)
	}
	if int64(len(data)) > maxDownloadSize {
		return nil, fmt.Errorf("download exceeds maximum size of %d bytes", maxDownloadSize)
	}
	return data, nil
}

// downloadAndVerifySHA512 downloads the .sha512 sidecar file for the given

View on GitHub (pinned to 329838acdf)

Solutions

  1. Retry the update; CDN or connectivity hiccups are the usual cause
  2. Check proxy/firewall settings for large binary downloads
  3. Fall back to a manual download from the release page
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at core/commands/update_github.go:220 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/aa904f37f2024b0d. Report an issue: GitHub.