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

Crashes when loading mods on Linux using yuzu-mainline-git AUR package #34

Closed anzix closed 6 months ago

anzix commented 8 months ago

Describe the bug When you click the button to download mods from any server (Official or The Boy 181), YuzuModDownloader simply crashes leaving the downloaded xml files. No mods have been downloaded to the ~/.local/share/yuzu/load/<ID>/ folder

To Reproduce Steps to reproduce the behavior:

  1. Build the yuzu-mainline-git package from AUR
  2. Copying the YuzuModDownloader Linux binary to the Desktop
  3. Making it executable
  4. From the terminal, I run inside the Desktop folder with the command ./YuzuModDownloader and downloading from any server (Official or TheBoy181)
  5. YuzuModDownloader crashes leaving the downloaded xml files

Expected behavior I was expecting to download mods without crash

Screenshots None

Desktop/Laptop (please complete the following information):

Additional context Here is the program log

Unhandled exception. System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/user/Desktop/"/home/user/.local/share/yuzu/load"'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String, Boolean )
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String, Boolean, EnumerationOptions )
   at System.IO.Enumeration.FileSystemEnumerable`1.DelegateEnumerator..ctor(FileSystemEnumerable`1, Boolean)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String, FindTransform, EnumerationOptions, Boolean)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String, FindTransform , EnumerationOptions )
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String, String, EnumerationOptions)
   at System.IO.Directory.InternalEnumeratePaths(String, String, SearchTarget, EnumerationOptions)
   at System.IO.Directory.GetDirectories(String, String, EnumerationOptions)
   at System.IO.Directory.GetDirectories(String)
   at YuzuModDownloader.Classes.Downloaders.ModDownloader.DeleteDownloadedModArchiveFiles()
   at YuzuModDownloader.Classes.Downloaders.ModDownloader.DownloadModsAsync(List`1)
   at YuzuModDownloader.Classes.Downloaders.OfficialYuzuModDownloader.DownloadModsAsync(List`1)
   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 392
   at Avalonia.Threading.DispatcherOperation.Execute() in /_/src/Avalonia.Base/Threading/DispatcherOperation.cs:line 262
   at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation) in /_/src/Avalonia.Base/Threading/Dispatcher.Queue.cs:line 117
   at Avalonia.Threading.Dispatcher.ExecuteJobsCore() in /_/src/Avalonia.Base/Threading/Dispatcher.Queue.cs:line 148
   at Avalonia.Threading.Dispatcher.Signaled() in /_/src/Avalonia.Base/Threading/Dispatcher.Queue.cs:line 128
   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]    3758985 IOT instruction (core dumped)  ./YuzuModDownloader
amakvana commented 7 months ago

Apologies for the delayed response! Thanks for opening up the issue!

This is due to a error in the parsing of the paths, it looks like Yuzu now wraps paths with ", which at the time wasn't accounted for within my path parsing - next update will fix this.

In the meantime, as a temp fix, locate your qt-config.ini file, scroll down to and find the load_directory key, once located, remove the double quotes from the path after the = and save the file.

Be sure to make a backup of the qt-config.ini in case anything goes wrong

garbear commented 7 months ago

Thanks for looking into this @amakvana! I hit the same problem, and reinitializing my qt-config.ini gave me load_directory fields without ", and now the doanloader is working correctly again.

amakvana commented 6 months ago

@garbear @anzix

Hi both!

Below is a Linux test build - fixing all repo's, path scraping for Linux (for Flatpak and deb installers) and some QOL UI tweaks. Please test drive and see if the issues you both were having, have been resolved.

Same instructions to run it as always:

cd ~/Desktop
chmod +x YuzuModDownloader
./YuzuModDownloader

Cheers!

YuzuModDownloader_1.4.1.0_Linux_Test_Build.zip

anzix commented 6 months ago

Yes, everything works, I can close the issue. Although some (archives) of mods have not been installed, for example "16:10 Aspect Ratio" for Animal Crossing. Outputs an error, here is the log.

./YuzuModDownloader

7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
 64-bit locale=ru_RU.UTF-8 Threads:12, ASM

Scanning the drive for archives:
1 file, 883 bytes (1 KiB)

Extracting archive: /home/user/.local/share/yuzu/load/01006F8002326000/32.9%20Super%20Ultrawide.zip
--
Path = /home/user/.local/share/yuzu/load/01006F8002326000/32.9%20Super%20Ultrawide.zip
Type = zip
Physical Size = 883

Everything is Ok

Folders: 2
Files: 1
Size:       515
Compressed: 883

7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
 64-bit locale=ru_RU.UTF-8 Threads:12, ASM

Scanning the drive for archives:
1 file, 847 bytes (1 KiB)

Extracting archive: /home/user/.local/share/yuzu/load/01006F8002326000/21.9%20Ultrawide.zip
--
Path = /home/user/.local/share/yuzu/load/01006F8002326000/21.9%20Ultrawide.zip
Type = zip
Physical Size = 847

Everything is Ok

Folders: 2
Files: 1
Size:       515
Compressed: 847

7-Zip (z) 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15
 64-bit locale=ru_RU.UTF-8 Threads:12, ASM

Scanning the drive for archives:
1 file, 134786 bytes (132 KiB)

Extracting archive: /home/user/.local/share/yuzu/load/01006F8002326000/16.10%20Aspect%20Ratio.zip
ERROR: /home/user/.local/share/yuzu/load/01006F8002326000/16.10%20Aspect%20Ratio.zip
/home/user/.local/share/yuzu/load/01006F8002326000/16.10%20Aspect%20Ratio.zip
Open ERROR: Cannot open the file as [zip] archive

ERRORS:
Is not archive

Can't open as archive: 1
Files: 0
Size:       0
Compressed: 0
amakvana commented 6 months ago

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