SubtitleEdit/subtitleedit · error · PlatformNotSupportedException
Operation is not supported on this platform.
Error message
Operation is not supported on this platform.
What it means
PlatformNotSupportedException with no message, thrown by Qwen3AsrCppDownloadService.GetUrl when the OS is neither Windows nor macOS - i.e. effectively unreachable on the supported Linux path which is handled above this fallthrough.
Source
Thrown at src/ui/Logic/Download/Qwen3AsrCppDownloadService.cs:84
return useVulkan ? WindowsVulkanUrl : WindowsUrl;
}
if (OperatingSystem.IsLinux())
{
if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
{
return LinuxArm64Url; // no Vulkan build for ARM64
}
return useVulkan ? LinuxVulkanUrl : LinuxUrl;
}
if (OperatingSystem.IsMacOS())
{
return RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? MacArmUrl : MacX64Url;
}
throw new PlatformNotSupportedException();
}
}
View on GitHub (pinned to 17a9f07487)
Solutions
- Verify the host is Windows, Linux, or macOS.
- Update the runtime for reliable OS detection.
- If a new platform is intentionally supported, add a returning branch in GetUrl.
- Report a bug if a supported OS still reaches the throw.
Example fix
// before
throw new PlatformNotSupportedException();
// after
throw new PlatformNotSupportedException(
$"Qwen3-ASR (cpp) has no build for OS={RuntimeInformation.OSDescription}."); Defensive patterns
Strategy: validation
Validate before calling
if (!OperatingSystem.IsWindows() && !OperatingSystem.IsLinux() && !OperatingSystem.IsMacOS())
{
throw new InvalidOperationException($"Unsupported OS for Qwen3-ASR: {RuntimeInformation.OSDescription}");
} Try / catch
try { url = service.GetUrl(...); }
catch (PlatformNotSupportedException) { /* engine not available on this OS; disable in UI */ } Prevention
- Gate the Qwen3-ASR option by supported OS in the UI.
- Keep the runtime current for accurate OS detection.
- Name the unsupported platform in a user-facing message.
When it happens
Trigger: Reached only after the Windows and Linux (x64/arm64, Vulkan/CPU) and macOS branches all fail to return. This is a defensive fallthrough for unrecognized platforms.
Common situations: Exotic OS, misreported platform in a container, or a future code edit that adds an OS branch without removing the fallthrough. On supported OSes it should not fire.
Related errors
- Operation is not supported on this platform.
- PaddleOCR is not available for Linux ARM64.
- Operation is not supported on this platform.
- Operation is not supported on this platform.
- Process.Start() is not supported on this platform.
AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13).
Data as JSON: /api/errors/d5c1dbf81e4ea16d.
Report an issue: GitHub.