xpipe-io/xpipe · error · IllegalStateException

Unable to find download url for ${repository}

Error message

Unable to find download url for ${repository}

What it means

GithubReleaseDownloader.getDownloadUrl() iterates the assets of the requested GitHub release and throws IllegalStateException("Unable to find download url for <repository>") when no asset name matches the filter and no browser_download_url can be returned. Called via request(), it means the release exists but has no matching downloadable asset.

Source

Thrown at app/src/main/java/io/xpipe/app/util/GithubReleaseDownloader.java:66

        var request = HttpRequest.newBuilder()
                .GET()
                .uri(URI.create("https://api.github.com/repos/" + repository + "/releases"))
                .build();
        var r = HttpHelper.client().send(request, HttpResponse.BodyHandlers.ofString());
        HttpHelper.checkOrThrow(r);

        var json = JacksonMapper.getDefault().readTree(r.body());
        var latest = json.get(0);
        var assets = latest.required("assets");
        for (var asset : assets) {
            var name = asset.required("name").asString();
            if (filter.test(name)) {
                var url = asset.required("browser_download_url").asString();
                return url;
            }
        }

        throw new IllegalStateException("Unable to find download url for " + repository);
    }
}

View on GitHub (pinned to d85ca821ba)

Solutions

  1. Check the release on GitHub and confirm an asset matching the expected name/extension exists
  2. Update the expected asset-name filter/pattern to match the current asset naming (OS/arch strings)
  3. Pin to a different release version that ships the required asset
  4. Retry after upstream publishes assets, or fall back to building from source

Example fix

// before
ReleaseInstaller.getLatestRelease(repo).getAssetUrl(name -> name.contains("macos"));
// after (upstream renamed assets)
...getAssetUrl(name -> name.contains("darwin")); // or match 'mac' / correct arch
Defensive patterns

Strategy: fallback

Validate before calling

// check the release has assets before requesting a download url
if (release.getAssets().isEmpty()) { /* choose another release or source */ }

Try / catch

try {
    url = GithubReleaseDownloader.request(repo, version, filter);
} catch (IllegalStateException e) {
    // fall back to latest release or a different asset pattern
}

Prevention

When it happens

Trigger: request(repo, ...) for a release whose JSON asset list contains no asset name passing `filter` — wrong asset name/extension expected, the release has no assets at all, or the release is a source-only tag.

Common situations: Version pinned to a release published without binaries; asset naming changed between releases (upstream rename); typos in expected asset pattern (OS/arch mismatch, e.g. requesting 'x86_64' when asset says 'amd64'); repository moved and cached release JSON is stale.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.


AI-assisted analysis of xpipe-io/xpipe@d85ca821ba (2026-09-06). Data as JSON: /api/errors/9d9ee79ba260a17d. Report an issue: GitHub.