abiosoft/colima · error
error downloading SHA file from '%s': %w
Error message
error downloading SHA file from '%s': %w
What it means
fetchSHAFromURL uses client.Fetch with a 30-second timeout to retrieve the checksum file and that fetch failed. The wrapped error is a *NetworkError (DNS/connect/timeout, including exceeding the 30s budget) or *HTTPStatusError (status >= 400, e.g. the checksum URL 404s). The artifact download is aborted because its digest cannot be established.
Source
Thrown at util/downloader/sha.go:107
return err
}
s.Digest = digest
}
return s.validateFile(filename)
}
// fetchSHAFromURL fetches SHA checksum file and extracts digest for the target file
func fetchSHAFromURL(shaURL, targetFilename string) (string, error) {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
client := NewHTTPClient()
// fetch SHA file content
data, err := client.Fetch(ctx, shaURL)
if err != nil {
return "", fmt.Errorf("error downloading SHA file from '%s': %w", shaURL, err)
}
// parse SHA file to find the matching entry
digest, err := parseSHAContent(data, targetFilename)
if err != nil {
return "", fmt.Errorf("error parsing SHA file from '%s': %w", shaURL, err)
}
return digest, nil
}
// parseSHAContent reads SHA checksum content and extracts the digest for the target filename.
// Supports formats:
// - GNU coreutils: "<hash> <filename>" (two spaces)
// - BSD/binary mode: "<hash> *<filename>" (space + asterisk)
func parseSHAContent(data []byte, targetFilename string) (string, error) {
scanner := bufio.NewScanner(bytes.NewReader(data))
for scanner.Scan() {View on GitHub (pinned to c3a5f9184d)
Solutions
- curl the checksum URL and confirm it returns the expected file
- Point SHA.URL at the checksum file of the exact release as the artifact URL
- Retry transient timeouts
- If upstream publishes no checksums at all, drop the SHA field from the Request
Defensive patterns
Strategy: retry
Type guard
func isRetryableFetch(err error) bool {
var ne *downloader.NetworkError
if errors.As(err, &ne) {
return true
}
var he *downloader.HTTPStatusError
if errors.As(err, &he) {
return he.StatusCode >= 500 || he.StatusCode == 429
}
return false
} Try / catch
cacheFile, err := downloader.Download(host, req)
if err != nil {
var fetchErr error = err
for attempt := 0; attempt < 3 && isRetryableFetch(fetchErr); attempt++ {
time.Sleep(time.Duration(attempt+1) * 2 * time.Second)
cacheFile, fetchErr = downloader.Download(host, req)
}
if fetchErr != nil {
return fetchErr // 404 on the sha URL needs a URL fix, not retries
}
} Prevention
- Point SHA.URL at the same release/directory as the artifact URL
- Verify checksum URLs when pinning versions; mirrors restructure checksum layouts
- Respect the 30s fetch budget — host the checksum near the artifact
When it happens
Trigger: Checksum URL wrong or the file was removed (404); checksum host slow enough to exceed the 30s timeout; DNS or proxy failure specific to the checksum host.
Common situations: Mirrors that publish binaries but not checksums; sha URL templated from a different release than the artifact URL; rate-limited hosts.
Related errors
- curl download failed for '%s': %w
- error resolving download URL '%s': %w
- error downloading '%s': %w
- error getting qcow image: %w
- error during image download: %w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/e97999cde3a9f526.
Report an issue: GitHub.