rockerbacon / modorganizer2-linux-installer

An easy-to-use Mod Organizer 2 installer for Linux
GNU General Public License v3.0
1.02k stars 80 forks source link

Installer gets stuck when extracting the morrowind_mwse.zip file #563

Open Toasterbirb opened 9 months ago

Toasterbirb commented 9 months ago

Trying to run the installer script and install support for Morrowind gets stuck in the following screen 92Kp5wH9FCO7

I checked the directory it says its extracting into and there seem to be some files, but it doesn't seem finish extracting the archive entirely. The archive is only around 8 megabytes in size, so it shouldn't take too long to extract. My /tmp is mounted as tmpfs and its size is set to 8 gigabytes, so it should fit everything without any issues.

Here's the output from the install.sh script

INFO: all dependencies met

(zenity:27169): Gtk-WARNING **: 04:44:10.662: No IM module matching GTK_IM_MODULE=fcitx found
INFO: selected game 'morrowind'
INFO: found Steam in '/home/toasterbirb/.local/share/Steam'
INFO: game found in '/home/toasterbirb/.local/share/Steam'
INFO: steam not found in '/home/toasterbirb/.var/app/com.valvesoftware.Steam/.local/share/Steam'
protontricks (WARNING): Steam library folder /mnt/usb/Steam not found. Protontricks might not have access to the directory.
protontricks (WARNING): Steam library folder /mnt/nas/Varasto/steam not found. Protontricks might not have access to the directory.
protontricks (WARNING): Current Steam Runtime not recognized by Protontricks.
steam-runtime-launcher-service[27345]: E: Can't find session bus: Error spawning command line `dbus-launch --autolaunch=5d58bbef2eeee7d1cddc1ab861e9a7a0 --binary-syntax --close-stderr': Failed to execute child process "dbus-launch" (No such file or directory)

(zenity:27355): Gtk-CRITICAL **: 04:44:29.330: GtkBox 0x555dc478b2b0 reports a minimum height of 200, but minimum height for width of 1048576 is 213. Expect overlapping widgets.

(zenity:27355): Gtk-CRITICAL **: 04:44:29.330: GtkBox 0x555dc4749560 reports a minimum height of 104, but minimum height for width of 1048576 is 117. Expect overlapping widgets.

(zenity:27355): Gtk-CRITICAL **: 04:44:29.354: GtkBox 0x555dc478b2b0 reports a minimum height of 200, but minimum height for width of 1048576 is 213. Expect overlapping widgets.

(zenity:27355): Gtk-CRITICAL **: 04:44:29.354: GtkBox 0x555dc4749560 reports a minimum height of 104, but minimum height for width of 1048576 is 117. Expect overlapping widgets.
INFO: deleting '/home/toasterbirb/.local/share/Steam/steamapps/compatdata/22320'

(zenity:27396): Gtk-WARNING **: 04:44:32.839: No IM module matching GTK_IM_MODULE=fcitx found
INFO: user confirmed prefix setup

(zenity:27689): Gtk-WARNING **: 04:44:55.315: No IM module matching GTK_IM_MODULE=fcitx found
INFO: selected install directory '/home/toasterbirb/.local/games/mod-organizer-2'
INFO: using wget backend
INFO: fetching remote resource at 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u312-b07/OpenJDK8U-jre_x64_windows_hotspot_8u312b07.zip'
INFO: downloading 'https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u312-b07/OpenJDK8U-jre_x64_windows_hotspot_8u312b07.zip' to '/tmp/mo2-linux-installer-downloads-cache/OpenJDK8U-jre_x64_windows_hotspot_8u312b07.zip'
INFO: extracting '/tmp/mo2-linux-installer-downloads-cache/OpenJDK8U-jre_x64_windows_hotspot_8u312b07.zip' to '/tmp/mo2-linux-installer-downloads-cache/OpenJDK8U-jre_x64_windows_hotspot_8u312b07'
INFO: using wget backend
INFO: fetching remote resource at 'https://github.com/ModOrganizer2/modorganizer/releases/download/v2.4.4/Mod.Organizer-2.4.4.7z'
INFO: downloading 'https://github.com/ModOrganizer2/modorganizer/releases/download/v2.4.4/Mod.Organizer-2.4.4.7z' to '/tmp/mo2-linux-installer-downloads-cache/Mod.Organizer-2.4.4.7z'
INFO: extracting '/tmp/mo2-linux-installer-downloads-cache/Mod.Organizer-2.4.4.7z' to '/tmp/mo2-linux-installer-downloads-cache/Mod.Organizer-2.4.4'
INFO: using wget backend
INFO: fetching remote resource at 'https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks'
INFO: downloading 'https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks' to '/tmp/mo2-linux-installer-downloads-cache/winetricks'
INFO: using wget backend
INFO: fetching remote resource at 'https://github.com/MWSE/MWSE/releases/download/build-automatic/mwse.zip'
INFO: downloading 'https://github.com/MWSE/MWSE/releases/download/build-automatic/mwse.zip' to '/tmp/mo2-linux-installer-downloads-cache/morrowind_mwse.zip'
INFO: extracting '/tmp/mo2-linux-installer-downloads-cache/morrowind_mwse.zip' to '/tmp/mo2-linux-installer-downloads-cache/morrowind_mwse'

I'm running Gentoo as my Linux distribution and if relevant, my 7-Zip version is 17.05 and unzip version 6.00

rockerbacon commented 9 months ago

Don't use this installer for Morrowind, see #552 .

I'm keeping this open since it's a general extraction issue. Can you confirm whether you're able to manually extract the file with the unzip command?

Toasterbirb commented 9 months ago

Don't use this installer for Morrowind, see https://github.com/rockerbacon/modorganizer2-linux-installer/issues/552

I initially had trouble getting OpenMW working and that lead me to this project, however I managed to get it working today and will definitely keep using it over Mod Organizer

Can you confirm whether you're able to manually extract the file with the unzip command?

Yes, there were no errors and it seemed to extract way more files when I ran the command manually.

Toasterbirb commented 9 months ago

The issue seems to be related to 7zip. I get this prompt when trying to extract it manually with 7z

toasterbirb@tux /tmp/extract_temp $ ls
morrowind_mwse.zip
toasterbirb@tux /tmp/extract_temp $ 7z x morrowind_mwse.zip

7-Zip [64] 17.05 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.05 (locale=fi_FI.utf8,Utf16=on,HugeFiles=on,64 bits,12 CPUs AMD Ryzen 5 5600G with Radeon Graphics          (A50F00),ASM,AES-NI)

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

Extracting archive: morrowind_mwse.zip
--
Path = morrowind_mwse.zip
Type = zip
Physical Size = 9074746

Would you like to replace the existing file:
  Path:     ./Data Files/MWSE/.vscode/extensions.json
  Size:     0 bytes
  Modified: 2024-01-25 00:11:33
with the file from archive:
  Path:     Data Files/MWSE/.vscode/extensions.json
  Size:     75 bytes (1 KiB)
  Modified: 2024-01-22 03:32:22
? (Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit?

This prompt is probably the thing that makes it freeze. Looking into the extracted directory, it looks like it initially extracts directories and then when I allow it to overwrite, it overwrites those directories with files with the same name.

For example, it first extracts a directory called /tmp/extract_temp/Data Files/MWSE/.vscode/launch.json and then immediately after that it prompts to overwrite it because the "file already exists". If I allow it to overwrite, it deletes the directory and now there's a json file with the same name with the directory gone.

Maybe the release zip file is somehow broken or there's a bug in 7zip. The unzip command has no trouble at all with extracting the archive.

rockerbacon commented 9 months ago

Looks like some funky behaviour in newer ports of 7z then. I'm testing the older 16.02 (possibly the myspace port) and it does not generate any prompts. The annoying thing about 7z is that there are a bunch of forks everywhere and I can't know exactly where you're pulling from, you'll have to contact the Gentoo package maintainers (or dig through the packages yourself). What I do know is that Igor has not released 17.05, skipping from 17.01 straight to 18.00.

It may be a good idea to pass the -y option to the command to mitigate the issue in the mean time. Can you confirm whether that's enough to "force" an extraction?

Toasterbirb commented 9 months ago

Yes, adding -y makes the installer get further, though it errors out later on for some other possibly unrelated reason.

I seem to have some fork of 7zip installed that can be found from here. I tried installing the original 7zip and that also seems to fix the issue so this is probably a bug in the port. Sadly the original 7zip gets installed as 7zz so simply having it on the system wouldn't solve the problem in this case.

Another solution I can think of would be to use unzip if its installed on the system, since its another common utility, especially for .zip files, though that probably wouldn't work with the progress indicator out of the box.

Toasterbirb commented 9 months ago

I submitted an issue to the p7zip repository https://github.com/p7zip-project/p7zip/issues/228

rockerbacon commented 9 months ago

I looked through the repo you linked and found this issue and a comment in there linking to this report on the Arch bug tracker. Seems to be a general problem in versions 17 and above.

If 7zip (7zz) works as a drop in replacement for p7zip (7z), it'd be very easy to support both.

I do feel it'd still be necessary to also support unzip, official 7zip Linux support is still recent and there may be a good amount of distros out there where it's not easily available.