d2phap/ImageGlass · error · NotSupportedException
IGE: This feature is not supported on
Error message
IGE: This feature is not supported on {BHelper.OS}. What it means
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.
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'.
Example fix
// before
await AppAPIProvider.IG_OpenWithAsync();
// after
if (BHelper.OS == OSType.Windows)
{
await AppAPIProvider.IG_OpenWithAsync();
} Defensive patterns
Strategy: validation
Validate before calling
if (BHelper.OS != OSType.Windows) return; // or OperatingSystem.IsWindows()
Type guard
static bool CanOpenWith() => BHelper.OS == OSType.Windows;
Try / catch
try { await AppAPIProvider.IG_OpenWithAsync(); }
catch (NotSupportedException ex) when (ex.Message.Contains("not supported on"))
{ /* hide or disable the command on this platform */ } Prevention
- 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.
When it happens
Trigger: Invoking the IG_OpenWith action (menu item, hotkey, or API call) on Linux or macOS.
Common situations: 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.
Related errors
- IGE: This feature is not supported on Linux.
- ' ' is not a valid color channel. ---------- 👉🏼 Method…
- Frame index ' ' is not a valid integer. ---------- 👉🏼…
- IGE: Could not move the file to trash
- IGE: This feature is not supported on macOS.
AI-assisted analysis of d2phap/ImageGlass@4a3c4fecef (2026-08-13).
Data as JSON: /api/errors/8f6a25d5cd2faaf5.
Report an issue: GitHub.
Appendix: source
Thrown at source/ImageGlass.Lib/Common/ServiceProviders/AppAPIs/AppAPIProvider.cs:572
// 3. export frames
Core.IsBusy = true;
var exportWindow = new ExportFramesWindow(srcFilePath, destDirPath);
await exportWindow.ShowAsync(App.MainWindow);
Core.IsBusy = false;
}
/// <summary>
/// Shows Open With window.
/// </summary>
public static async Task IG_OpenWithAsync()
{
if (BHelper.OS != OSType.Windows)
{
throw new NotSupportedException($"IGE: This feature is not supported on {BHelper.OS}.");
}
string? filePath = null;
var isClipboardPhoto = Core.ClipboardImage is not null;
if (isClipboardPhoto)
{
_ = Message.ShowAsync(Core.Lang[LangId._CreatingFile], delayMs: 500);
// save clipboard photo as temp PNG file
filePath = await Core.SavePhotoAsTempFileAsync();
}
else
{
filePath = Core.Photos.CurrentFilePath;
}View on GitHub (pinned to 4a3c4fecef)