{"record":{"id":"724fa8a9e020a90d","repo":"henrygd/beszel","slug":"missing-asset-containing-suffix","errorCode":null,"errorMessage":"missing asset containing ${suffix}","messagePattern":"missing asset containing (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/ghupdate/release.go","lineNumber":36,"sourceCode":"\tTag       string          `json:\"tag_name\"`\n\tPublished string          `json:\"published_at\"`\n\tUrl       string          `json:\"html_url\"`\n\tBody      string          `json:\"body\"`\n\tAssets    []*releaseAsset `json:\"assets\"`\n\tId        int             `json:\"id\"`\n}\n\n// findAssetBySuffix returns the first available asset containing the specified suffix.\nfunc (r *release) findAssetBySuffix(suffix string) (*releaseAsset, error) {\n\tif suffix != \"\" {\n\t\tfor _, asset := range r.Assets {\n\t\t\tif strings.HasSuffix(asset.Name, suffix) {\n\t\t\t\treturn asset, nil\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil, errors.New(\"missing asset containing \" + suffix)\n}\n","sourceCodeStart":18,"sourceCodeEnd":38,"githubUrl":"https://github.com/henrygd/beszel/blob/b38fb7dafa60812cc22e6a84ce313e94f1ce0a32/internal/ghupdate/release.go#L18-L38","documentation":"findAssetBySuffix scans a GitHub release's asset list for one whose filename ends with the given suffix (e.g. a GOOS/GOARCH triple like '_linux_amd64.tar.gz'). If no asset matches, it returns this error, meaning the release has no build for the requested platform.","triggerScenarios":"update() looks up the release asset matching the current OS/arch but the release JSON contains no asset name with that suffix — e.g. suffix computed as 'beszel-agent_linux_arm64.tar.gz' but the release only publishes different naming.","commonSituations":"Self-updating on a niche platform (riscv64, freebsd/arm) that upstream doesn't publish; a renamed asset scheme in a newer release version; querying a forked or mirror release with partial assets; network/proxy serving a truncated asset list.","solutions":["Verify the platform is published on the target GitHub release's Assets list","Update to a version whose release naming matches the suffix generator","Manually download and replace the binary if auto-update can't find the asset","If using a fork/mirror, ensure it publishes assets with the same naming scheme"],"exampleFix":"// before: checking update on unsupported arch\n_, err := updater.Update(ctx) // findAssetBySuffix fails\n// after: verify the asset exists first\nrelease, _ := ghupdate.GetLatestRelease(ctx, \"henrygd\", \"beszel\")\nfor _, a := range release.Assets { log.Println(a.Name) } // confirm suffix exists","handlingStrategy":"try-catch","validationCode":"// confirm the asset exists before updating\nrelease, _ := ghupdate.GetLatestRelease(ctx, owner, repo)\nwanted := \"beszel-agent_\" + runtime.GOOS + \"_\" + runtime.GOARCH\nfor _, a := range release.Assets {\n    if strings.Contains(a.Name, wanted) { return } // ok\n}\nlog.Fatalf(\"no published asset for %s\", wanted)","typeGuard":null,"tryCatchPattern":"asset, err := findAssetBySuffix(release.Assets, suffix)\nif err != nil {\n    return fmt.Errorf(\"auto-update unsupported for this platform: %w\", err)\n}","preventionTips":["Check the release assets page for your GOOS/GOARCH before enabling self-update","Pin manual installs for platforms upstream doesn't publish","Watch release notes for asset naming changes","Test updates on mirrors/forks to ensure assets are mirrored"],"tags":["self-update","github-release","assets","platform"],"backgroundTag":"release-asset-not-found","analyzedSha":"b38fb7dafa60812cc22e6a84ce313e94f1ce0a32","analyzedAt":"2026-08-31T15:10:10.149Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}