hasura/graphql-engine · error
downloading asset: %w
Error message
downloading asset: %w
What it means
downloadAsset performs an http.Get on the release asset URL; any transport-level failure (DNS, refused connection, timeout, TLS) is wrapped with KindNetwork. This happens during ApplyUpdate when fetching the new CLI binary from the release host.
Source
Thrown at cli/update/update.go:74
arch := runtime.GOARCH
extension := ""
if os == "windows" {
extension = ".exe"
}
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)View on GitHub (pinned to 724551b9ae)
Solutions
- Verify the release host is reachable from the environment (curl -I the asset URL)
- Configure HTTP(S)_PROXY for the CLI process if behind a corporate proxy
- Download the binary manually and install it, or pin/skip auto-update in restricted environments
- Retry later if the failure is transient
Defensive patterns
Strategy: retry
Try / catch
var f *os.File
err := retry(3, time.Second, func() error {
var e error
f, e = downloadAsset(url, name, path)
return e
})
if err != nil { /* fall back to manual install instructions */ } Prevention
- Retry transient network failures with backoff before surfacing to the user
- Provide a manual download fallback in docs/scripts
- Whitelist the release host in firewalled environments
When it happens
Trigger: Calling ApplyUpdate() (usually via 'cli update') when the release download host is unreachable, blocked by a firewall/proxy, or DNS fails; also with invalid/expired asset URLs.
Common situations: Air-gapped or CI environments blocking release downloads, corporate proxies, revoked or moved release assets after a provider migration.
Related errors
- could not find the release asset
- pulling latest actions codegen files from internet failed: %
- unable to fetch introspection schema: %w
- error in fetching introspection schema: %w
- setting up codegen-assets repo failed (this is required for
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/fe73e61181a3f5ca.
Report an issue: GitHub.