amakvana / SwitchEmuModDownloader

SwitchEmuModDownloader - A Cross-Platform One-Click Games Mod Downloader for Switch emulators. Formerly YuzuModDownloader.
GNU General Public License v3.0
567 stars 35 forks source link

Crash when Yuzu installed via Flatpak (qt-config.ini not found) #29

Closed rotanigroc closed 6 months ago

rotanigroc commented 11 months ago

Describe the bug YuzuModDownloader crashes when run on a Linux system with Yuzu installed via Flatpak.

To Reproduce Steps to reproduce the behavior:

  1. Install yuzu via Flatpak 1a. Via "Pop!_Shop" on PopOS
  2. Add game
  3. Download and launch YuzuModDownloader
  4. Try to download repo

Expected behavior

Screenshots If applicable, add screenshots to help explain your problem.

Desktop/Laptop (please complete the following information):

Additional context Error seen when attempting to download from "HolographicWings"

❯ ./YuzuModDownloader 
Unhandled exception. System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/$USER/.config/yuzu/qt-config.ini'.
   at Interop.ThrowExceptionForIoErrno(ErrorInfo, String, Boolean)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String, OpenFlags, Int32, Func`4)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String, FileMode, FileAccess, FileShare, FileOptions, Int64, UnixFileMode, Int64& , UnixFileMode& , Func`4 )
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String, FileMode, FileAccess, FileShare, FileOptions, Int64, Nullable`1)
   at System.IO.FileStream..ctor(String, FileMode, FileAccess, FileShare, Int32, Boolean)
   at System.IO.FileStream..ctor(String, FileMode, FileAccess, FileShare, Int32)
   at System.IO.StreamReader.ValidateArgsAndOpenPath(String, Encoding, Int32)
   at System.IO.StreamReader..ctor(String, Encoding, Boolean, Int32)
   at System.IO.StreamReader..ctor(String, Boolean)
   at System.IO.StreamReader..ctor(String)
   at YuzuModDownloader.Classes.Downloaders.ModDownloader.GetModPath(String)
   at YuzuModDownloader.Classes.Downloaders.ModDownloader..ctor(IHttpClientFactory, Boolean, Boolean)
   at YuzuModDownloader.Classes.Downloaders.HolographicWingsTotkModDownloader..ctor(IHttpClientFactory, Boolean, Boolean)
   at YuzuModDownloader.MainWindow.BtnDownload_ClickAsync(Object, RoutedEventArgs)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore() in /_/src/Avalonia.Base/Threading/DispatcherOperation.cs:line 412
   at Avalonia.Threading.DispatcherOperation.Execute() in /_/src/Avalonia.Base/Threading/DispatcherOperation.cs:line 268
   at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation) in /_/src/Avalonia.Base/Threading/Dispatcher.Queue.cs:line 121
   at Avalonia.Threading.Dispatcher.ExecuteJobsCore() in /_/src/Avalonia.Base/Threading/Dispatcher.Queue.cs:line 176
   at Avalonia.Threading.Dispatcher.Signaled() in /_/src/Avalonia.Base/Threading/Dispatcher.Queue.cs:line 129
   at Avalonia.X11.X11PlatformThreading.CheckSignaled() in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 119
   at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 192
   at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl) in /_/src/Avalonia.Base/Threading/DispatcherFrame.cs:line 117
   at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame) in /_/src/Avalonia.Base/Threading/Dispatcher.MainLoop.cs:line 53
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.MainLoop.cs:line 80
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[]) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 122
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder, String[], ShutdownMode ) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 215
   at YuzuModDownloader.Program.Main(String[])
[1]    22565 IOT instruction (core dumped)  ./YuzuModDownloader

Workaround/Fix I was able to resolve this on my system via these commands:

# Create path YuzuModDownloader is checking for the .ini in
❯ mkdir -p /home/$USER/.config/yuzu/

# Sym link the actual qt-confi.ini to that location
❯ ln -s /home/$USER/.var/app/org.yuzu_emu.yuzu/config/yuzu/qt-config.ini /home/$USER/.config/yuzu/qt-config.ini

After this, the "HolographicWings" repo was able to be downloaded successfully.

amakvana commented 6 months ago

Hi @rotanigroc

The issue has been fixed in a recent test build linked below, would you be able to check and see if the changes apply on your end?

https://github.com/amakvana/YuzuModDownloader/issues/34#issuecomment-1917040517

Cheers!

amakvana commented 6 months ago

Closed - Fixed in v1.4.1.0 https://github.com/amakvana/YuzuModDownloader/releases/latest