{"record":{"id":"a228c90e90b4e692","repo":"SubtitleEdit/subtitleedit","slug":"libvlc-download-is-not-supported-on-this-platform","errorCode":null,"errorMessage":"LibVLC download is not supported on this platform","messagePattern":"LibVLC download is not supported on this platform","errorType":"exception","errorClass":"PlatformNotSupportedException","httpStatus":null,"severity":"critical","filePath":"src/ui/Logic/Download/LibVlcDownloadService.cs","lineNumber":59,"sourceCode":"                case Architecture.X86:\n                    return WindowsX86Url;\n                default:\n                    throw new PlatformNotSupportedException(\"Unsupported Windows architecture.\");\n            }\n        }\n\n        if (OperatingSystem.IsMacOS())\n        {\n            switch (RuntimeInformation.ProcessArchitecture)\n            {\n                // case Architecture.Arm64:\n                //     return MacArmUrl; // e.g., for M1, M2, M3, M4, M5 chips\n                case Architecture.X64:\n                    return MacX64Url;\n            }\n        }\n\n        throw new PlatformNotSupportedException(\"LibVLC download is not supported on this platform\");\n    }\n}","sourceCodeStart":41,"sourceCodeEnd":61,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Logic/Download/LibVlcDownloadService.cs#L41-L61","documentation":"Terminal fallback thrown by LibVlcDownloadService.GetUrl() when on macOS the architecture is not X64 (the MacArm64 case is commented out) or when the OS is neither Windows nor macOS (e.g. Linux, which has no branch at all). The message is explicit: 'LibVLC download is not supported on this platform'.","triggerScenarios":"macOS running an Apple Silicon (Arm64) process — the MacArm64 branch is commented out so it falls through; any Linux or other OS where neither Windows nor macOS x64 branches apply.","commonSituations":"Apple Silicon Mac users (the most common hit, since the Arm64 case is disabled); Linux users expecting LibVLC auto-download; the commented code signals Mac Arm support is pending. Distinct from 335 (which is the Windows default).","solutions":["On Apple Silicon Macs, run the app under Rosetta as an x64 process so the MacX64Url branch applies.","On Linux, install libvlc via the distro package manager instead of auto-download.","To support Apple Silicon natively, uncomment the MacArm64 case and supply a valid LibVLC ARM64 build URL."],"exampleFix":"// before\nif (OperatingSystem.IsMacOS())\n{\n    switch (RuntimeInformation.ProcessArchitecture)\n    {\n        // case Architecture.Arm64: return MacArmUrl;\n        case Architecture.X64: return MacX64Url;\n    }\n}\nthrow new PlatformNotSupportedException(\"LibVLC download is not supported on this platform\");\n\n// after: enable Apple Silicon\nif (OperatingSystem.IsMacOS())\n{\n    switch (RuntimeInformation.ProcessArchitecture)\n    {\n        case Architecture.Arm64: return MacArmUrl;\n        case Architecture.X64:   return MacX64Url;\n        default: throw new PlatformNotSupportedException(\"Unsupported macOS architecture.\");\n    }\n}","handlingStrategy":"validation","validationCode":"static bool IsLibVlcSupportedHere()\n    => OperatingSystem.IsWindows()\n       || (OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.X64);\n\nif (!IsLibVlcSupportedHere()) { DisableLibVlcPlayback(); return; }","typeGuard":"static bool LibVlcPlatformSupported()\n    => OperatingSystem.IsWindows()\n       || (OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.X64);","tryCatchPattern":"try { var url = vlcService.GetUrl(); }\ncatch (PlatformNotSupportedException ex) when (ex.Message.Contains(\"not supported on this platform\"))\n{ _logger.Warning(\"LibVLC download unsupported here: {OS}/{Arch}\", RuntimeInformation.OSDescription, RuntimeInformation.ProcessArchitecture); DisableLibVlcPlayback(); }","preventionTips":["On Apple Silicon, run under Rosetta as x64 or install libvlc via Homebrew.","On Linux, use the distro libvlc package; don't rely on auto-download.","Uncomment the MacArm64 branch with a valid URL to enable Apple Silicon natively."],"tags":["platform","macos","arm64","libvlc","download","commented-out"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}