{"record":{"id":"15ed8e47abe68832","repo":"SubtitleEdit/subtitleedit","slug":"unsupported-os-platform","errorCode":null,"errorMessage":"Unsupported OS platform","messagePattern":"Unsupported OS platform","errorType":"exception","errorClass":"PlatformNotSupportedException","httpStatus":null,"severity":"error","filePath":"src/ui/Logic/Download/YtDlpDownloadService.cs","lineNumber":135,"sourceCode":"    {\n        if (OperatingSystem.IsWindows())\n        {\n            return Path.Combine(Se.DataFolder, \"yt-dlp.exe\");\n        }\n\n        if (OperatingSystem.IsLinux())\n        {\n            return RuntimeInformation.ProcessArchitecture == Architecture.Arm64\n                ? Path.Combine(Se.DataFolder, \"yt-dlp_linux_aarch64\")\n                : Path.Combine(Se.DataFolder, \"yt-dlp_linux\");\n        }\n\n        if (OperatingSystem.IsMacOS())\n        {\n            return Path.Combine(Se.DataFolder, \"yt-dlp_macos\");\n        }\n\n        throw new PlatformNotSupportedException(\"Unsupported OS platform\");\n    }\n    private static string GetUrl()\n    {\n        if (OperatingSystem.IsWindows())\n        {\n            return WindowsUrl;\n        }\n\n        if (OperatingSystem.IsLinux())\n        {\n            return RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? LinuxArmUrl : LinuxUrl;\n        }\n\n        if (OperatingSystem.IsMacOS())\n        {\n            return MacUrl;\n        }\n","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Logic/Download/YtDlpDownloadService.cs#L117-L153","documentation":"Thrown by GetFullFileName in YtDlpDownloadService when the OS is neither Windows, Linux, nor macOS. The method computes the on-disk filename for the yt-dlp binary (different name per OS: yt-dlp.exe / yt-dlp_linux_aarch64 / yt-dlp_macos). On an unsupported OS it cannot pick a name, so it throws before any download attempt.","triggerScenarios":"Calling DownloadYtDlp/DownloadVideo/DownloadSubtitlesOnlyAsync on FreeBSD, Solaris, or any OS where OperatingSystem.IsWindows/IsLinux/IsMacOS all return false.","commonSituations":"Running SE under .NET on BSD or a niche Unix; also triggered by a misreported OS in some container runtimes.","solutions":["Run on a supported OS (Windows, Linux, or macOS).","Add a branch for your OS mapping to a yt-dlp binary name you supply manually.","Pre-place the yt-dlp binary yourself and skip DownloadYtDlp entirely."],"exampleFix":"// before\nif (OperatingSystem.IsMacOS()) return Path.Combine(Se.DataFolder, \"yt-dlp_macos\");\nthrow new PlatformNotSupportedException(\"Unsupported OS platform\");\n\n// after\nif (OperatingSystem.IsMacOS()) return Path.Combine(Se.DataFolder, \"yt-dlp_macos\");\nif (OperatingSystem.IsFreeBSD()) return Path.Combine(Se.DataFolder, \"yt-dlp_freebsd\");\nthrow new PlatformNotSupportedException($\"Unsupported OS: {RuntimeInformation.OSDescription}\");","handlingStrategy":"validation","validationCode":"if (!OperatingSystem.IsWindows() && !OperatingSystem.IsLinux() && !OperatingSystem.IsMacOS())\n{ /* yt-dlp filename cannot be resolved */ }","typeGuard":"static bool IsYtDlpPlatformSupported() =>\n    OperatingSystem.IsWindows() || OperatingSystem.IsLinux() || OperatingSystem.IsMacOS();","tryCatchPattern":"try { await svc.DownloadYtDlp(progress, ct); }\ncatch (PlatformNotSupportedException ex) when (ex.Message.Contains(\"Unsupported OS\"))\n{ /* install yt-dlp manually for this OS */ }","preventionTips":["Run SE on Windows, Linux, or macOS for yt-dlp support.","Provide a manual yt-dlp install path for unsupported OSes."],"tags":["platform","yt-dlp","download","operating-system"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}