{"record":{"id":"8f6a25d5cd2faaf5","repo":"d2phap/ImageGlass","slug":"ige-this-feature-is-not-supported-on-bhelper-os","errorCode":null,"errorMessage":"IGE: This feature is not supported on {BHelper.OS}.","messagePattern":"IGE: This feature is not supported on (.+?)\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"source/ImageGlass.Lib/Common/ServiceProviders/AppAPIs/AppAPIProvider.cs","lineNumber":572,"sourceCode":"\n        // 3. export frames\n        Core.IsBusy = true;\n\n        var exportWindow = new ExportFramesWindow(srcFilePath, destDirPath);\n        await exportWindow.ShowAsync(App.MainWindow);\n\n        Core.IsBusy = false;\n    }\n\n\n    /// <summary>\n    /// Shows Open With window.\n    /// </summary>\n    public static async Task IG_OpenWithAsync()\n    {\n        if (BHelper.OS != OSType.Windows)\n        {\n            throw new NotSupportedException($\"IGE: This feature is not supported on {BHelper.OS}.\");\n        }\n\n\n        string? filePath = null;\n        var isClipboardPhoto = Core.ClipboardImage is not null;\n\n\n        if (isClipboardPhoto)\n        {\n            _ = Message.ShowAsync(Core.Lang[LangId._CreatingFile], delayMs: 500);\n\n            // save clipboard photo as temp PNG file\n            filePath = await Core.SavePhotoAsTempFileAsync();\n        }\n        else\n        {\n            filePath = Core.Photos.CurrentFilePath;\n        }","sourceCodeStart":554,"sourceCodeEnd":590,"githubUrl":"https://github.com/d2phap/ImageGlass/blob/4a3c4feceffc5a8bb5e56ba836509634aaae47a9/source/ImageGlass.Lib/Common/ServiceProviders/AppAPIs/AppAPIProvider.cs#L554-L590","documentation":"Thrown by AppAPIProvider.IG_OpenWithAsync when BHelper.OS is not Windows. The feature uses the Windows shell 'Open With' dialog (Core.ShellProvider.ShowOpenWith), which has no equivalent on Linux or macOS in this build.","triggerScenarios":"Invoking the IG_OpenWith action (menu item, hotkey, or API call) on Linux or macOS.","commonSituations":"Running the Linux or Mac build and the Open With command is still exposed in the UI or bound to a hotkey; a script calling the API regardless of platform.","solutions":["Gate the call on BHelper.OS == OSType.Windows (or OperatingSystem.IsWindows()) before invoking.","Hide the UI entry on non-Windows via the OnPlatform XAML markup extension on IsVisible.","On non-Windows, open the containing folder or the system default app as a fallback instead of 'Open With'."],"exampleFix":"// before\nawait AppAPIProvider.IG_OpenWithAsync();\n\n// after\nif (BHelper.OS == OSType.Windows)\n{\n    await AppAPIProvider.IG_OpenWithAsync();\n}","handlingStrategy":"validation","validationCode":"if (BHelper.OS != OSType.Windows) return; // or OperatingSystem.IsWindows()","typeGuard":"static bool CanOpenWith() => BHelper.OS == OSType.Windows;","tryCatchPattern":"try { await AppAPIProvider.IG_OpenWithAsync(); }\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"not supported on\"))\n{ /* hide or disable the command on this platform */ }","preventionTips":["Hide Windows-only menu items on non-Windows with OnPlatform on IsVisible.","Check BHelper.OS once at startup and cache platform capability flags.","Provide a non-Windows fallback (open containing folder) where useful."],"tags":["platform","windows-only","shell","app-api"],"backgroundTag":null,"analyzedSha":"4a3c4feceffc5a8bb5e56ba836509634aaae47a9","analyzedAt":"2026-08-13T16:58:15.523Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}