KrystianLesniak / Flow.Launcher.Plugin.GamesLauncher

Flow launcher plugin for searching and launching games from multiple platforms like Steam, Epic Games, Xbox etc.
MIT License
16 stars 0 forks source link

Plugin crashes when there's no EGS games installed #42

Closed jordanyoong1 closed 1 year ago

jordanyoong1 commented 1 year ago

Just a tiny bug, I had to install a Epic Games Store‘s game for it to not crash lol.

02:23:16.5056+08:00 - INFO  - App.OnStartup - Begin Flow Launcher startup ----------------------------------------------------
02:23:16.5056+08:00 - INFO  - App.OnStartup - Runtime info:
Flow Launcher version: 1.16.2
OS Version: 22631.2715
IntPtr Length: 8
x64: True
02:23:16.8413+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <System Commands> is <2ms>
02:23:16.8413+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Plugin Indicator> is <2ms>
02:23:16.8413+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Process Killer> is <2ms>
02:23:16.8413+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <URL> is <14ms>
02:23:16.8413+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Colors> is <2ms>
02:23:16.8724+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Fancy Emoji> is <28ms>
02:23:16.8724+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Web Searches> is <37ms>
02:23:16.8780+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loading plugins from https://fastly.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json
02:23:16.8780+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Shell> is <41ms>
02:23:16.8780+08:00 - INFO  - Flow.Launcher.Plugin.Program.Main - Preload programs cost <4ms>
02:23:16.8780+08:00 - INFO  - Flow.Launcher.Plugin.Program.Main - Number of preload win32 programs <152>
02:23:16.8780+08:00 - INFO  - Flow.Launcher.Plugin.Program.Main - Number of preload uwps <22>
02:23:16.8915+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Calculator> is <53ms>
02:23:16.8915+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Windows Settings> is <59ms>
02:23:16.8915+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Browser Bookmarks> is <64ms>
02:23:16.9193+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Program> is <81ms>
02:23:16.9222+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loading plugins from https://gcore.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json
02:23:16.9222+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loading plugins from https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json
02:23:16.9222+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loading plugins from https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/plugin_api_v2/plugins.json
02:23:16.9222+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Explorer> is <98ms>
02:23:17.0110+08:00 - INFO  - CommunityPluginSource.FetchAsync - Loaded 134 plugins from https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json
02:23:17.0110+08:00 - INFO  - PluginManager.InitializePlugins - Total init cost for <Plugins Manager> is <178ms>
02:23:17.0207+08:00 - ERROR - PluginManager.InitializePluginsAsync - Fail to Init plugin: GamesLauncher
EXCEPTION OCCURS: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\ProgramData\Epic\EpicGamesLauncher\Data\Manifests'.
   at IntPtr System.IO.Enumeration.FileSystemEnumerator<TResult>.CreateDirectoryHandle(string path, bool ignoreNotFound)
   at void System.IO.Enumeration.FileSystemEnumerator<TResult>.Init()
   at new System.IO.Enumeration.FileSystemEnumerable<TResult>(string directory, FindTransform transform, EnumerationOptions options, bool isNormalized)
   at IEnumerable<string> System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(string directory, string expression, EnumerationOptions options)
   at IEnumerable<string> System.IO.Directory.InternalEnumeratePaths(string path, string searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at async Task<IEnumerable<EpicGame>> GamesLauncher.Platforms.SyncEngines.Epic.EpicSyncEngine.GetEpicGamesFromMetadata()
   at async Task GamesLauncher.Platforms.SyncEngines.Epic.EpicSyncEngine.SynchronizeGames()
   at async Task GamesLauncher.Platforms.PlatformsManager.SynchronizeGames(MainSettings settings)+(?) => { }
   at async Task System.Threading.Tasks.Parallel.ForEachAsync<TSource>(IEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body)+(?) => { }
   at async Task GamesLauncher.Platforms.PlatformsManager.SynchronizeGames(MainSettings settings)
   at async Task GamesLauncher.Main.ReloadDataAsync()
   at async Task GamesLauncher.Main.InitAsync(PluginInitContext context)
   at async Task<long> Flow.Launcher.Infrastructure.Stopwatch.DebugAsync(string message, Func<Task> action) in C:/projects/flow-launcher/Flow.Launcher.Infrastructure/Stopwatch.cs:line 34
   at async Task Flow.Launcher.Core.Plugin.PluginManager.InitializePluginsAsync(IPublicAPI api)+(?) => { } in C:/projects/flow-launcher/Flow.Launcher.Core/Plugin/PluginManager.cs:line 125

02:23:17.2914+08:00 - INFO  - App.OnStartup - Dependencies Info:
Python Path: C:\Users\Jordan\AppData\Roaming\FlowLauncher\Environments\Python\PythonEmbeddable-v3.11.4\pythonw.exe
Node Path: 
02:23:17.4938+08:00 - INFO  - ImageLoader.Initialize - Preload images cost <936ms>
02:23:17.4938+08:00 - INFO  - ImageLoader.Initialize - Number of preload images is <52>, Images Number: 52, Unique Items 40
02:23:17.5197+08:00 - INFO  - App.OnStartup - End Flow Launcher startup ----------------------------------------------------  
02:23:17.5197+08:00 - INFO  - App.OnStartup - Startup cost <1096ms>
02:23:19.3383+08:00 - INFO  - Updater.UpdateApp - Future Release <{
  "SHA1": "8F28D1D91AC6829EE310E7A217C9BC4416F0272C",
  "BaseUrl": null,
  "Filename": "FlowLauncher-1.16.2-full.nupkg",
  "Query": null,
  "Filesize": 93464021,
  "IsDelta": false,
  "StagingPercentage": null,
  "EntryAsString": "8F28D1D91AC6829EE310E7A217C9BC4416F0272C FlowLauncher-1.16.2-full.nupkg 93464021",
  "Version": {
    "Version": "1.16.2.0",
    "SpecialVersion": ""
  },
  "PackageName": "FlowLauncher"
}>
KrystianLesniak commented 1 year ago

Hello. Thank you for contribution!

I believe this issue happens whenever Epic Launcher has been installed and later uninstalled.

Hotfix applied in the release: https://github.com/KrystianLesniak/Flow.Launcher.Plugin.GamesLauncher/releases/tag/v1.7.1

Update should be available soon in Flow Launcher Plugin Store!