LykosAI/StabilityMatrix · error · NotSupportedException
The package does not support extensions.
Error message
The package {PackagePair?.BasePackage} does not support extensions. What it means
RefreshCore in PackageExtensionBrowserViewModel requires the package's BasePackage to expose an ExtensionManager. If PackagePair?.BasePackage.ExtensionManager is null, it throws NotSupportedException stating the package does not support extensions. This is a capability check: only packages whose implementation provides an extension manager can browse or install extensions.
Solutions
- Use this view only with packages that support extensions (BasePackage.ExtensionManager != null).
- Guard the caller with a capability check before opening the extension browser and disable the entry point otherwise.
- Verify PackagePair is fully initialized (BasePackage and InstalledPackage set) before refreshing.
- Update the package/base package definition to one that implements an ExtensionManager.
Example fix
// before
if (PackagePair?.BasePackage.ExtensionManager is not { } extensionManager)
throw new NotSupportedException($"The package {PackagePair?.BasePackage} does not support extensions.");
// after
if (PackagePair?.BasePackage.ExtensionManager is not { } extensionManager)
{
Logger.LogWarning("Package {Package} does not support extensions; skipping refresh", PackagePair?.BasePackage);
return;
} Defensive patterns
Strategy: try-catch
Validate before calling
if (viewModel.PackagePair?.BasePackage?.ExtensionManager is null) {
// disable the extension browser entry point for this package
return;
} Type guard
bool SupportsExtensions(PackagePair? pair) => pair?.BasePackage?.ExtensionManager is not null;
Try / catch
try { await viewModel.Refresh(); }
catch (NotSupportedException ex) { Logger.LogWarning(ex, "Extensions unsupported"); Notify("This package does not support extensions."); } Prevention
- Only expose the extension browser UI for package types with an ExtensionManager.
- Verify PackagePair and BasePackage are initialized before opening the view.
- Document which packages support extensions so users know what to expect.
When it happens
Trigger: Opening the extension browser (Refresh/RefreshBackground -> RefreshCore) for a package whose type does not implement an ExtensionManager, or when PackagePair/BasePackage is null so the extension manager lookup fails.
Common situations: Browsing extensions for a backend package (e.g. ComfyUI vs a package without extension support) that lacks extension integration; a partially initialized PackagePair where BasePackage hasn't been set; a package version whose extension support was added later.
Related errors
- Unknown pixel format
- Unsupported SKColorType
- Unsupported SKAlphaType
- Unsupported SKColorType
- Unsupported SKAlphaType
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/c589c777e11b7b3e.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageExtensionBrowserViewModel.cs:788
RefreshBackground();
}
public void RefreshBackground()
{
RefreshCore()
.SafeFireAndForget(ex =>
{
notificationService.ShowPersistent("Failed to refresh extensions", ex.ToString());
});
}
private async Task RefreshCore()
{
using var _ = CodeTimer.StartDebug();
if (PackagePair?.BasePackage.ExtensionManager is not { } extensionManager)
throw new NotSupportedException(
$"The package {PackagePair?.BasePackage} does not support extensions."
);
var availableExtensions = (
await extensionManager.GetManifestExtensionsAsync(
extensionManager.GetManifests(PackagePair.InstalledPackage)
)
).ToArray();
var installedExtensions = (
await extensionManager.GetInstalledExtensionsAsync(PackagePair.InstalledPackage)
).ToArray();
// Synchronize
SynchronizeExtensions(availableExtensions, installedExtensions);
await Task.Run(() =>
{View on GitHub (pinned to af93d6ef57)