glanceapp/glance · warning
no releases found for repository %s
Error message
no releases found for repository %s
What it means
Returned by fetchLatestGithubRelease (internal/glance/widget-releases.go:245) when GitHub's /repos/{repo}/releases endpoint returns an empty array. This path is only taken when IncludePreleases is true (show-pre-releases option): the code fetches the full release list and errors if it has zero entries. Note the /releases/latest variant (no pre-releases) surfaces as a decode/404 error instead, and GitHub's releases API never returns tag-only releases — they must be published as GitHub Releases.
Source
Thrown at internal/glance/widget-releases.go:245
if request.token != nil {
httpRequest.Header.Add("Authorization", "Bearer "+(*request.token))
}
var response githubReleaseResponseJson
if !request.IncludePreleases {
response, err = decodeJsonFromRequest[githubReleaseResponseJson](defaultHTTPClient, httpRequest)
if err != nil {
return nil, err
}
} else {
responses, err := decodeJsonFromRequest[[]githubReleaseResponseJson](defaultHTTPClient, httpRequest)
if err != nil {
return nil, err
}
if len(responses) == 0 {
return nil, fmt.Errorf("no releases found for repository %s", request.Repository)
}
response = responses[0]
}
return &appRelease{
Source: releaseSourceGithub,
Name: request.Repository,
Version: normalizeVersionFormat(response.TagName),
NotesUrl: response.HtmlUrl,
TimeReleased: parseRFC3339Time(response.PublishedAt),
Downvotes: response.Reactions.Downvotes,
}, nil
}
type dockerHubRepositoryTagsResponse struct {
Results []dockerHubRepositoryTagResponse `json:"results"`
}View on GitHub (pinned to 91324e8de7)
Solutions
- Confirm the repository actually has published (non-draft) GitHub Releases at github.com/{owner}/{repo}/releases
- If the project only tags, there is no release to show — remove it from the widget or ask upstream to publish releases
- For private repos, provide a token with repo read access via the token: option
- Double-check owner/name spelling — a wrong name usually 404s earlier, but a same-named empty repo hits this
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check that a repo has published releases (unauthenticated)
resp, _ := http.Get("https://api.github.com/repos/" + repo + "/releases")
// empty array => will hit "no releases found" Try / catch
if err != nil && strings.Contains(err.Error(), "no releases found for repository") {
// repo publishes tags only; drop it or accept the gap
} Prevention
- Only track repos with published GitHub Releases
- Remember drafts are invisible to the API
- Use a token for private repos
When it happens
Trigger: GET https://api.github.com/repos/{owner}/{repo}/releases returns [] — the repository publishes tags but no GitHub Releases, all releases are drafts (invisible to the API), the repo is a private repo and the token lacks access (404 path can also decode to empty), or the repo genuinely has never cut a release.
Common situations: Tracking a project that uses plain git tags without GitHub Releases; all releases still marked draft; expecting pre-release listing for a repo whose only release is a draft/prerelease filtered by permissions; misspelled repo name on a fork without releases.
Related errors
- %w: could not get %d releases
- no tags found for repository: %s
- repository is required
- invalid source
- could not umarshal repository into string or struct: %v
AI-assisted analysis of glanceapp/glance@91324e8de7 (2026-08-15).
Data as JSON: /api/errors/bcf8850660f7f366.
Report an issue: GitHub.