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

  1. Verify the host is Windows, Linux, or macOS.
  2. Update the runtime for reliable OS detection.
  3. If a new platform is intentionally supported, add a returning branch in GetUrl.
  4. 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

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


AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13). Data as JSON: /api/errors/d5c1dbf81e4ea16d. Report an issue: GitHub.