SubtitleEdit/subtitleedit · critical · PlatformNotSupportedException

ChatLLM is not available for Linux ARM64.

Error message

ChatLLM is not available for Linux ARM64.

What it means

Thrown by ChatLlmDownloadService.GetUrl() when the process is running on Linux with an ARM64 (aarch64) CPU. ChatLLM binaries are only published for Linux x64, Windows, and macOS, so the service refuses to hand out a URL it cannot honor. It is a PlatformNotSupportedException, meaning the operation is structurally unavailable rather than transiently failing.

Source

Thrown at src/ui/Logic/Download/ChatLlmDownloadService.cs:61

    }

    public async Task DownloadEngine(Stream stream, IProgress<float>? progress, CancellationToken cancellationToken)
    {
        await DownloadHelper.DownloadFileAsync(_httpClient, GetUrl(), stream, progress, cancellationToken);
    }

    private static string GetUrl()
    {
        if (OperatingSystem.IsWindows())
        {
            return WindowsUrl;
        }

        if (OperatingSystem.IsLinux())
        {
            if (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
            {
                throw new PlatformNotSupportedException("ChatLLM is not available for Linux ARM64.");
            }

            return LinuxUrl;
        }

        if (OperatingSystem.IsMacOS())
        {
            switch (RuntimeInformation.ProcessArchitecture)
            {
                case Architecture.Arm64:
                    return MacArmUrl; // e.g., for M1, M2, M3, M4, M5 chips
                // case Architecture.X64:
                //     return MacX64Url;
                default:
                    throw new PlatformNotSupportedException("Unsupported macOS architecture.");
            }
        }
        throw new PlatformNotSupportedException();

View on GitHub (pinned to 17a9f07487)

Solutions

  1. Run the application on a Linux x64, Windows, or macOS (Intel or Apple Silicon) host instead of Linux ARM64.
  2. If ARM64 Linux is required, build/obtain a ChatLLM build for that architecture yourself and skip the service's GetUrl() by supplying the binary through an alternate install path.
  3. Confirm RuntimeInformation.ProcessArchitecture at startup and disable the ChatLLM feature on ARM64 Linux via feature flag rather than letting the call fail at download time.

Example fix

// before
var url = ChatLlmDownloadService.GetUrl(); // throws on arm64 linux

// after
if (OperatingSystem.IsLinux() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
{
    _logger.Warning("ChatLLM is unsupported on Linux ARM64; feature disabled.");
    return;
}
var url = ChatLlmDownloadService.GetUrl();
Defensive patterns

Strategy: validation

Validate before calling

// Run before invoking ChatLLM download
static bool IsChatLlmSupportedOnThisPlatform()
    => OperatingSystem.IsWindows()
       || OperatingSystem.IsMacOS()
       || (OperatingSystem.IsLinux() && RuntimeInformation.ProcessArchitecture != Architecture.Arm64);

if (!IsChatLlmSupportedOnThisPlatform()) { DisableChatLlmFeature(); return; }

Type guard

// narrows to a supported config before GetUrl()
static bool CanGetChatLlmUrl()
    => OperatingSystem.IsWindows()
       || OperatingSystem.IsMacOS()
       || (OperatingSystem.IsLinux() && RuntimeInformation.ProcessArchitecture != Architecture.Arm64);

Try / catch

try { var url = ChatLlmDownloadService.GetUrl(); }
catch (PlatformNotSupportedException ex) when (ex.Message.Contains("Linux ARM64"))
{ _logger.Warning("ChatLLM disabled: {Msg}", ex.Message); DisableChatLlmFeature(); }

Prevention

When it happens

Trigger: Calling any ChatLLM download API (GetUrl() directly, or DownloadXxx that internally resolves the URL) while RuntimeInformation.ProcessArchitecture == Architecture.Arm64 AND OperatingSystem.IsLinux() returns true. This includes Raspberry Pi 4/5, AWS Graviton, Ampere Altra, and Linux ARM dev containers.

Common situations: Running the app on a Raspberry Pi or other ARM SBC; deploying to Graviton-based cloud VMs; cross-compiling and running under qemu-arm64 emulation; CI on ARM Linux runners. Also hit by users who installed an arm64 .NET runtime by mistake on an x64 host.

Related errors


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