LykosAI/StabilityMatrix · error · Exception
No download URL available
Error message
No download URL available
What it means
BaseGitPackage.GetDownloadUrl builds a download URL from the selected VersionOptions. If the version has a BranchName it returns the GitHub zipball URL, but when no branch, tag, or release-derived URL could be constructed it throws a generic Exception("No download URL available"). The library throws it because the resolved version points at neither a release asset nor a branch, so there is no determinate archive to download.
Solutions
- Set VersionOptions.BranchName (or re-select a valid release/tag version in the UI) so the zipball URL can be built, e.g. versionOptions = new VersionOptions { BranchName = "master" }.
- Refresh the package's available versions via the GitHub API and choose an existing release; the previously selected one no longer exists upstream.
- If VersionOptions came from stored config/workspace data, correct the JSON so version fields (tag/branch) are populated.
- Verify RepositoryAuthor/RepositoryName point at a real, accessible repo (renamed/moved repos break version resolution).
Example fix
// before
var options = new InstallPackageOptions { VersionOptions = new VersionOptions() };
await package.InstallPackage(options, progress); // Exception: No download URL available
// after
var options = new InstallPackageOptions
{
VersionOptions = new VersionOptions { BranchName = "master" }
};
await package.InstallPackage(options, progress); // builds .../zipball/master Defensive patterns
Strategy: validation
Validate before calling
if (versionOptions is null ||
string.IsNullOrWhiteSpace(versionOptions.BranchName) &&
string.IsNullOrWhiteSpace(versionOptions.TagName) &&
versionOptions.Version is null)
{
throw new ArgumentException("VersionOptions must specify a branch, tag, or release version before install.");
} Type guard
bool HasResolvableVersion(VersionOptions? v) =>
v is not null &&
(!string.IsNullOrWhiteSpace(v.BranchName) || !string.IsNullOrWhiteSpace(v.TagName) || v.Version is not null); Try / catch
try
{
await package.InstallPackage(options, progress, ct);
}
catch (Exception ex) when (ex.Message == "No download URL available")
{
logger.LogError(ex, "Version {Version} of {Repo} has no downloadable archive; re-selecting latest release",
options.VersionOptions, package.RepositoryName);
options.VersionOptions = await package.GetLatestVersionAsync(ct); // refresh and retry
} Prevention
- Always populate VersionOptions from a freshly queried version list (GitHub API) instead of hand-written or stale config values.
- Handle upstream release/tag deletion by refreshing available versions when an install fails.
- When persisting workspace config, validate that version fields survive serialization round-trips.
When it happens
Trigger: Calling DownloadPackage/Install with VersionOptions whose BranchName is null/whitespace and which also lacks a usable tag or release reference — e.g. passing a default-constructed VersionOptions, a version pointing at a commit hash the URL builder does not handle, or a repository where the selected release was deleted so no asset/zipball URL resolves.
Common situations: A pinned package version was removed by the upstream repo (release or tag deleted), leaving VersionOptions with no branch; a config/workspace JSON was hand-edited and the version fields were dropped or blanked; a fork was swapped in whose release/branch layout does not match what the package class expects.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Documentation repository or branch not found.
- Git installation canceled
- Git command [ ] failed with exit code
- Unsupported Windows ROCm package command type
- Documentation folder is empty or not available yet.
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/c34fee434561a20e.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs:67
protected string GetDownloadUrl(DownloadPackageVersionOptions versionOptions)
{
if (!string.IsNullOrWhiteSpace(versionOptions.CommitHash))
{
return $"https://github.com/{RepositoryAuthor}/{RepositoryName}/archive/{versionOptions.CommitHash}.zip";
}
if (!string.IsNullOrWhiteSpace(versionOptions.VersionTag))
{
return $"https://api.github.com/repos/{RepositoryAuthor}/{RepositoryName}/zipball/{versionOptions.VersionTag}";
}
if (!string.IsNullOrWhiteSpace(versionOptions.BranchName))
{
return $"https://api.github.com/repos/{RepositoryAuthor}/{RepositoryName}/zipball/{versionOptions.BranchName}";
}
throw new Exception("No download URL available");
}
protected BaseGitPackage(
IGithubApiCache githubApi,
ISettingsManager settingsManager,
IDownloadService downloadService,
IPrerequisiteHelper prerequisiteHelper,
IPyInstallationManager pyInstallationManager,
IPipWheelService pipWheelService
)
: base(settingsManager)
{
GithubApi = githubApi;
DownloadService = downloadService;
PrerequisiteHelper = prerequisiteHelper;
PyInstallationManager = pyInstallationManager;
PipWheelService = pipWheelService;
}View on GitHub (pinned to af93d6ef57)