hasura/graphql-engine · error

could not find the release asset

Error message

could not find the release asset

What it means

downloadAsset got an HTTP response but the status code was not 200, meaning the asset URL resolved at the transport level yet the server did not serve the file - typically 404 for a missing asset for the detected platform, or 403 for rate-limited/blocked release downloads.

Source

Thrown at cli/update/update.go:80

	return fmt.Sprintf(
		"https://github.com/hasura/graphql-engine/releases/download/v%s/cli-hasura-%s-%s%s",
		v, os, arch, extension,
	)
}

func downloadAsset(url, fileName, filePath string) (*os.File, error) {
	var op errors.Op = "update.downloadAsset"

	res, err := http.Get(url)
	if err != nil {
		return nil, errors.E(op, errors.KindNetwork, fmt.Errorf("downloading asset: %w", err))
	}
	defer res.Body.Close()

	if res.StatusCode != http.StatusOK {
		return nil, errors.E(op, errors.E("could not find the release asset"))
	}

	asset, err := os.OpenFile(
		filepath.Join(filePath, fileName),
		os.O_CREATE|os.O_WRONLY|os.O_TRUNC,
		0o755,
	)
	if err != nil {
		return nil, errors.E(op, fmt.Errorf("creating new binary file: %w", err))
	}
	defer asset.Close()

	_, err = io.Copy(asset, res.Body)
	if err != nil {
		return nil, errors.E(op, fmt.Errorf("saving downloaded file: %w", err))
	}

	return asset, nil
}

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Check the release page for the latest version and confirm an asset exists for your OS/arch
  2. If rate-limited, wait or authenticate; in CI cache or vendor the binary instead of auto-updating
  3. Update the CLI via a package manager or manual download instead of self-update
Defensive patterns

Strategy: fallback

Try / catch

if _, err := downloadAsset(url, name, path); err != nil {
    if strings.Contains(err.Error(), "could not find the release asset") {
        // direct user to the releases page for manual download
    }
}

Prevention

When it happens

Trigger: Calling ApplyUpdate() when the release for the latest version lacks an asset matching the current OS/architecture (404), or when the release host rate-limits unauthenticated downloads (403).

Common situations: A release published without binaries for a niche platform, an incomplete/mirrored release, rate limiting of release downloads in CI, or a stale URL for a deleted release asset.

Related errors


AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28). Data as JSON: /api/errors/bc19957d66f21a10. Report an issue: GitHub.