From 80b0b6031ee173a47f3ef8c5b579795d23847232 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 4 Sep 2025 21:49:16 +1000 Subject: [PATCH 1/2] handle version parse fail and reorder last manifest fetch date --- .../ExternalPlugins/PluginsManifest.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs b/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs index d3086cbbc66..0f35c882574 100644 --- a/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs +++ b/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs @@ -43,8 +43,6 @@ public static async Task UpdateManifestAsync(bool usePrimaryUrlOnly = fals if (results.Count == 0) return false; - lastFetchedAt = DateTime.Now; - var updatedPluginResults = new List(); var appVersion = SemanticVersioning.Version.Parse(Constant.Version); @@ -56,6 +54,8 @@ public static async Task UpdateManifestAsync(bool usePrimaryUrlOnly = fals UserPlugins = updatedPluginResults; + lastFetchedAt = DateTime.Now; + return true; } } @@ -73,9 +73,21 @@ public static async Task UpdateManifestAsync(bool usePrimaryUrlOnly = fals private static bool IsMinimumAppVersionSatisfied(UserPlugin plugin, SemanticVersioning.Version appVersion) { - if (string.IsNullOrEmpty(plugin.MinimumAppVersion) || appVersion >= SemanticVersioning.Version.Parse(plugin.MinimumAppVersion)) + if (string.IsNullOrEmpty(plugin.MinimumAppVersion)) return true; + try + { + if (appVersion >= SemanticVersioning.Version.Parse(plugin.MinimumAppVersion)) + return true; + } + catch (Exception e) + { + API.LogException(ClassName, $"Failed to parse the minimum app version {plugin.MinimumAppVersion} for plugin {plugin.Name}. " + + "Plugin excluded from manifest", e); + return false; + } + API.LogDebug(ClassName, $"Plugin {plugin.Name} requires minimum Flow Launcher version {plugin.MinimumAppVersion}, " + $"but current version is {Constant.Version}. Plugin excluded from manifest."); From 5d297c1f19025697775725d58907e829a6bcd4eb Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 4 Sep 2025 22:36:43 +1000 Subject: [PATCH 2/2] update to log info for plugin version requirement failure --- Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs b/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs index 0f35c882574..1e845498ce4 100644 --- a/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs +++ b/Flow.Launcher.Core/ExternalPlugins/PluginsManifest.cs @@ -88,7 +88,7 @@ private static bool IsMinimumAppVersionSatisfied(UserPlugin plugin, SemanticVers return false; } - API.LogDebug(ClassName, $"Plugin {plugin.Name} requires minimum Flow Launcher version {plugin.MinimumAppVersion}, " + API.LogInfo(ClassName, $"Plugin {plugin.Name} requires minimum Flow Launcher version {plugin.MinimumAppVersion}, " + $"but current version is {Constant.Version}. Plugin excluded from manifest."); return false;