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 from Qwen3TtsCppDownloadService.GetUrl when the OS is neither Linux nor macOS (and implicitly not Windows, handled earlier). Defensive fallthrough.
Source
Thrown at src/ui/Logic/Download/Qwen3TtsCppDownloadService.cs:151
return windowsVariant switch
{
WindowsVariantCpu => WindowsCpuUrl,
WindowsVariantCuda => WindowsCudaUrl,
_ => WindowsVulkanUrl,
};
}
if (OperatingSystem.IsLinux())
{
return RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? LinuxArmUrl : LinuxUrl;
}
if (OperatingSystem.IsMacOS())
{
return MacUrl;
}
throw new PlatformNotSupportedException();
}
}View on GitHub (pinned to 17a9f07487)
Solutions
- Confirm the host is a supported OS.
- Update the runtime for reliable detection.
- Add a returning branch if a new platform is intentionally supported.
- Report a bug if a supported OS reaches this throw.
Example fix
// before
throw new PlatformNotSupportedException();
// after
throw new PlatformNotSupportedException(
$"Qwen3-TTS (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-TTS: {RuntimeInformation.OSDescription}");
} Try / catch
try { url = service.GetUrl(...); }
catch (PlatformNotSupportedException) { /* engine unavailable on this OS; hide option */ } Prevention
- Gate the Qwen3-TTS option by supported OS in the UI.
- Keep the runtime current for accurate OS detection.
- Provide a clear unsupported-platform message.
When it happens
Trigger: All of Windows (implicit), Linux (x64/arm64), and macOS branches fail to return - effectively an unrecognized platform.
Common situations: Unusual OS, containerized runtime misreporting platform, or a future refactor that adds an OS branch without removing the fallthrough.
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/6913d19706b3988b.
Report an issue: GitHub.