chenhg5/cc-connect · error
no releases found
Error message
no releases found
What it means
A sentinel from fetchLatestPreRelease: the GitHub releases API responded successfully with valid JSON but an empty array — the repository genuinely exposes no releases, so there is nothing to update or install.
Source
Thrown at cmd/cc-connect/update.go:238
req.Header.Set("Accept", "application/vnd.github.v3+json")
resp, err := client.Do(req)
if err != nil {
return nil, fmt.Errorf("request failed: %w", err)
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
return nil, fmt.Errorf("GitHub API returned HTTP %d", resp.StatusCode)
}
var releases []githubRelease
if err := json.NewDecoder(resp.Body).Decode(&releases); err != nil {
return nil, fmt.Errorf("parse releases: %w", err)
}
if len(releases) == 0 {
return nil, fmt.Errorf("no releases found")
}
// Return the first (newest) release, which may be a pre-release
return &releases[0], nil
}
// fetchLatestStableRelease fetches the latest stable release (no pre-releases).
func fetchLatestStableRelease() (*githubRelease, error) {
client := &http.Client{Timeout: 15 * time.Second}
req, _ := http.NewRequest("GET", githubAPI, nil)
req.Header.Set("Accept", "application/vnd.github.v3+json")
resp, err := client.Do(req)
if err == nil {
defer resp.Body.Close()
if resp.StatusCode == 200 {
var release githubRelease
if err := json.NewDecoder(resp.Body).Decode(&release); err == nil {View on GitHub (pinned to 4000b2338a)
Solutions
- Verify the repository actually has published releases on its GitHub Releases page
- If using a fork/mirror, point githubAllAPI at the upstream repo that publishes releases
- Check that releases aren't only drafts — publish them so the API returns them
- Skip auto-update and install the binary manually
Defensive patterns
Strategy: fallback
Validate before calling
// check the repo has releases before enabling auto-update:
resp, _ := http.Get("https://api.github.com/repos/<owner>/<repo>/releases?per_page=1")
var first []json.RawMessage
json.NewDecoder(resp.Body).Decode(&first)
if len(first) == 0 { fmt.Println("upstream repo has no published releases; auto-update unavailable") } Try / catch
// Go: treat empty release list as non-fatal
rel, err := fetchRelease()
if err != nil {
if strings.Contains(err.Error(), "no releases found") {
log.Println("no upstream releases; skipping update check")
return nil // graceful skip instead of failing the command
}
return err
} Prevention
- Verify the release repo URL matches the repo that actually publishes binaries
- Remember drafts and private releases are invisible to the public API
- Publish releases before shipping versions that enable self-update
- Keep a manual install path documented for when auto-update finds nothing
When it happens
Trigger: The GET .../releases?per_page=10 succeeded with HTTP 200 and valid JSON, but len(releases) == 0: the target repository has zero published releases.
Common situations: Building from a fork or a repo that has never published a GitHub release; all releases deleted or drafts-only (drafts are not returned by the public API); updater pointed at a staging/dev mirror instead of the release repo; migration where releases weren't imported.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- no release found
- request failed: %w
- GitHub API returned HTTP %d
- parse releases: %w
- unexpected redirect: %s
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/156074bc37aaac09.
Report an issue: GitHub.