{"record":{"id":"76c6af601bb023d4","repo":"router-for-me/CLIProxyAPI","slug":"release-asset-s-not-found","errorCode":null,"errorMessage":"release asset %s not found","messagePattern":"release asset (.+?) not found","errorType":"http","errorClass":null,"httpStatus":502,"severity":"error","filePath":"internal/pluginstore/github.go","lineNumber":319,"sourceCode":"\t\terr = urlError.Err\n\t}\n\treturn fmt.Errorf(\"request %s failed: %w\", safeURL, err)\n}\n\nfunc SelectReleaseAssets(release Release, id, version, goos, goarch string) (ReleaseAsset, ReleaseAsset, error) {\n\tarchiveName := ArchiveName(id, version, goos, goarch)\n\tvar archiveAsset ReleaseAsset\n\tvar checksumAsset ReleaseAsset\n\tfor _, asset := range release.Assets {\n\t\tswitch strings.TrimSpace(asset.Name) {\n\t\tcase archiveName:\n\t\t\tarchiveAsset = asset\n\t\tcase \"checksums.txt\":\n\t\t\tchecksumAsset = asset\n\t\t}\n\t}\n\tif strings.TrimSpace(archiveAsset.Name) == \"\" {\n\t\treturn ReleaseAsset{}, ReleaseAsset{}, fmt.Errorf(\"release asset %s not found\", archiveName)\n\t}\n\tif strings.TrimSpace(checksumAsset.Name) == \"\" {\n\t\treturn ReleaseAsset{}, ReleaseAsset{}, fmt.Errorf(\"release asset checksums.txt not found\")\n\t}\n\treturn archiveAsset, checksumAsset, nil\n}\n\nfunc ArchiveName(id, version, goos, goarch string) string {\n\treturn fmt.Sprintf(\n\t\t\"%s_%s_%s_%s.zip\",\n\t\tstrings.TrimSpace(id),\n\t\tstrings.TrimSpace(version),\n\t\tstrings.TrimSpace(goos),\n\t\tstrings.TrimSpace(goarch),\n\t)\n}\n","sourceCodeStart":301,"sourceCodeEnd":336,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/pluginstore/github.go#L301-L336","documentation":"SelectReleaseAssets scanned every asset in a GitHub release and found none whose name matches ArchiveName(id, version, goos, goarch) — i.e. '<id>_<version>_<goos>_<goarch>.zip' (names compared after TrimSpace). This means the release was published without an artifact for your platform/version combination, so installation cannot proceed.","triggerScenarios":"Calling SelectReleaseAssets (or InstallVersion -> installRelease) for a GOOS/GOARCH pair the release did not build — e.g. release only contains _linux_amd64.zip while installing on darwin/arm64; or version string mismatch between the archive filename and the resolved release version.","commonSituations":"Installing on an uncommon platform (freebsd, arm64 variants) the plugin's CI never targeted; release workflow changed naming or stopped uploading zips; a 'latest' tag whose assets use a different version string than the tag.","solutions":["Inspect the release's asset list on GitHub and confirm the expected '<id>_<version>_<goos>_<goarch>.zip' exists","Set options.GOOS/GOARCH explicitly to match a published asset","Ask the plugin maintainer to add a build for your platform (or adjust the goreleaser workflow)","Check for version-string mismatches (leading 'v', build metadata) between the asset filename and the version you passed"],"exampleFix":"// before\nresult, err := client.InstallVersion(ctx, plugin, tag, version, InstallOptions{})\n\n// after\nrelease, _ := client.FetchReleaseByTag(ctx, plugin, tag)\nfor _, a := range release.Assets {\n    fmt.Println(a.Name) // confirm '<id>_<version>_<goos>_<goarch>.zip' is present before installing\n}","handlingStrategy":"validation","validationCode":"// Check platform coverage before installing.\nwant := pluginstore.ArchiveName(id, version, runtime.GOOS, runtime.GOARCH)\nfound := false\nfor _, a := range release.Assets {\n    if strings.TrimSpace(a.Name) == want { found = true; break }\n}\nif !found { return fmt.Errorf(\"no asset %q in release\", want) }","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"release asset\") && strings.Contains(err.Error(), \"not found\") {\n    // list available assets, pick another GOOS/GOARCH, or skip the plugin\n}","preventionTips":["List release assets and match against ArchiveName before calling InstallVersion","Pin to releases known to publish your platform","In multi-platform tooling, check per-platform asset presence first"],"tags":["release-assets","platform","goarch","goos","github-api","go"],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}