router-for-me/CLIProxyAPI · error

release asset %s not found

Error message

release asset %s not found

What it means

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.

Source

Thrown at internal/pluginstore/github.go:319

		err = urlError.Err
	}
	return fmt.Errorf("request %s failed: %w", safeURL, err)
}

func SelectReleaseAssets(release Release, id, version, goos, goarch string) (ReleaseAsset, ReleaseAsset, error) {
	archiveName := ArchiveName(id, version, goos, goarch)
	var archiveAsset ReleaseAsset
	var checksumAsset ReleaseAsset
	for _, asset := range release.Assets {
		switch strings.TrimSpace(asset.Name) {
		case archiveName:
			archiveAsset = asset
		case "checksums.txt":
			checksumAsset = asset
		}
	}
	if strings.TrimSpace(archiveAsset.Name) == "" {
		return ReleaseAsset{}, ReleaseAsset{}, fmt.Errorf("release asset %s not found", archiveName)
	}
	if strings.TrimSpace(checksumAsset.Name) == "" {
		return ReleaseAsset{}, ReleaseAsset{}, fmt.Errorf("release asset checksums.txt not found")
	}
	return archiveAsset, checksumAsset, nil
}

func ArchiveName(id, version, goos, goarch string) string {
	return fmt.Sprintf(
		"%s_%s_%s_%s.zip",
		strings.TrimSpace(id),
		strings.TrimSpace(version),
		strings.TrimSpace(goos),
		strings.TrimSpace(goarch),
	)
}

View on GitHub (pinned to 78f0c4079e)

Solutions

  1. Inspect the release's asset list on GitHub and confirm the expected '<id>_<version>_<goos>_<goarch>.zip' exists
  2. Set options.GOOS/GOARCH explicitly to match a published asset
  3. Ask the plugin maintainer to add a build for your platform (or adjust the goreleaser workflow)
  4. Check for version-string mismatches (leading 'v', build metadata) between the asset filename and the version you passed

Example fix

// before
result, err := client.InstallVersion(ctx, plugin, tag, version, InstallOptions{})

// after
release, _ := client.FetchReleaseByTag(ctx, plugin, tag)
for _, a := range release.Assets {
    fmt.Println(a.Name) // confirm '<id>_<version>_<goos>_<goarch>.zip' is present before installing
}
Defensive patterns

Strategy: validation

Validate before calling

// Check platform coverage before installing.
want := pluginstore.ArchiveName(id, version, runtime.GOOS, runtime.GOARCH)
found := false
for _, a := range release.Assets {
    if strings.TrimSpace(a.Name) == want { found = true; break }
}
if !found { return fmt.Errorf("no asset %q in release", want) }

Try / catch

if err != nil && strings.Contains(err.Error(), "release asset") && strings.Contains(err.Error(), "not found") {
    // list available assets, pick another GOOS/GOARCH, or skip the plugin
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15). Data as JSON: /api/errors/76c6af601bb023d4. Report an issue: GitHub.