sharkwouter / minigalaxy

A simple GOG client for Linux
https://sharkwouter.github.io/minigalaxy/
GNU General Public License v3.0
1.1k stars 71 forks source link

Banished: Wine extraction failed #605

Open tastytea opened 3 months ago

tastytea commented 3 months ago

i'm using the minigalaxy flatpak, version 1.3.0.

% MG_DEBUG=1 flatpak run io.github.sharkwouter.Minigalaxy
[…]
2024-07-05 12:58:52,443 - minigalaxy.download_manager.DownloadManager - DEBUG - Returning result from _download_operation: True
2024-07-05 12:58:52,446 - minigalaxy.download_manager.DownloadManager - DEBUG - Download finished, thread 140233517553344
2024-07-05 12:58:52,448 - minigalaxy - INFO - Installing Banished
2024-07-05 12:58:52,450 - minigalaxy.download_manager.DownloadManager - DEBUG - Removing download from active downloads list
2024-07-05 12:58:54,208 - minigalaxy - INFO - setup_banished_64_1.0.7_(14938).exe integrity is preserved. MD5 is: 463b2720c5c88c28f24de9176b8b1ec4
2024-07-05 13:00:13,283 - minigalaxy - ERROR - Wine extraction failed.

is there a way to get more debug info, try out different wine versions, …?

sharkwouter commented 3 months ago

This is probably an issue with the flatpak package. Can you reproduce it with a natively installed verison?

tastytea commented 3 months ago

i tried to install minigalaxy_1.3.0_all.deb from the github release page in a debian 12 VM and minigalaxy won't start:

traceback ``` Traceback (most recent call last): File "/usr/games/minigalaxy", line 66, in main() File "/usr/games/minigalaxy", line 46, in main from minigalaxy.ui.gtk import Gtk File "/usr/lib/python3/dist-packages/minigalaxy/ui/__init__.py", line 3, in from minigalaxy.ui.window import Window # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/ui/window.py", line 6, in from minigalaxy.ui.categoryfilters import CategoryFilters File "/usr/lib/python3/dist-packages/minigalaxy/ui/categoryfilters.py", line 6, in from minigalaxy.ui.filterswitch import FilterSwitch File "/usr/lib/python3/dist-packages/minigalaxy/ui/filterswitch.py", line 4, in from minigalaxy.ui.gtk import Gtk File "/usr/lib/python3/dist-packages/minigalaxy/ui/gtk.py", line 5, in gi.require_version('Notify', '0.7') File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace Notify not available ```

with the minigalaxy in debian's repos (1.2.2) and wine-8.0 Banished installs, but won't start:

traceback ``` Traceback (most recent call last): File "/usr/lib/python3/dist-packages/minigalaxy/ui/gametile.py", line 127, in on_button_click err_msg = start_game(self.game) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/launcher.py", line 46, in start_game error_message, process = run_game_subprocess(game) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/launcher.py", line 203, in run_game_subprocess get_execute_command(game), ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/launcher.py", line 63, in get_execute_command exe_cmd = get_windows_exe_cmd(game, files) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/launcher.py", line 140, in get_windows_exe_cmd filename = os.path.splitext(os.path.basename(executables[0]))[0] + '.exe' ~~~~~~~~~~~^^^ IndexError: list index out of range ```

i'd rather not install it on my gentoo machine because that would mean a lot of compilation that i try to avoid with flatpak 😊

ell1e commented 3 months ago

I think this is possibly related to #602 and might be a race condition or some other unpredictable trigger. When I prompt to install a few games, I seem to see this with every 2nd one or so. Maybe it's related to queuing multiple games to install at once?

Edit: or maybe it's some of the installer downloads getting corrupted or truncated due to internet hiccups? Is minigalaxy verifying the checksum of what it downloaded before running it? If not, maybe that could also be the cause. Whatever it is, it feels like throwing dice to see whether an install works fine or not.

Edit 2: nevermind I got to test it with a better internet connection and the extraction failed still happens with the same games

sharkwouter commented 2 months ago

It did some more research into this and it turns out that the dependency on the package gir1.2-notify-0.7 is missing from the Debian package. @tastytea can you try installing it?

tastytea commented 2 months ago

with gir1.2-notify-0.7 installed minigalaxy 1.3.0 starts but i get this error when i try to install banished:

traceback ``` 2024-08-07 10:58:43,820 - minigalaxy - ERROR - Error installing game Banished Traceback (most recent call last): File "/usr/lib/python3/dist-packages/minigalaxy/installer.py", line 66, in install_game error_message = extract_installer(game, installer, tmp_dir, language, _use_innoextract) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/installer.py", line 131, in extract_installer err_msg = extract_windows(game, installer, temp_dir, language, use_innoextract) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/installer.py", line 150, in extract_windows err_msg = extract_by_wine(game, installer, temp_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/installer.py", line 205, in extract_by_wine os.unlink(drive) FileNotFoundError: [Errno 2] No such file or directory: '/home/tea/GOG Games/Banished/prefix/dosdevices/d:' 2024-08-07 10:58:43,841 - minigalaxy - ERROR - Unhandled error. ```

there is a symlink d:: to /dev/sr0 in this directory. after renaming it to d: banished installs. but when i hit play, i get the same error as with minigalaxy from the debian repos:

traceback ``` Traceback (most recent call last): File "/usr/lib/python3/dist-packages/minigalaxy/ui/gametile.py", line 121, in on_button_click err_msg = start_game(self.game) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/launcher.py", line 48, in start_game error_message, process = run_game_subprocess(game) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/launcher.py", line 205, in run_game_subprocess get_execute_command(game), ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/launcher.py", line 65, in get_execute_command exe_cmd = get_windows_exe_cmd(game, files) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/minigalaxy/launcher.py", line 142, in get_windows_exe_cmd filename = os.path.splitext(os.path.basename(executables[0]))[0] + '.exe' ~~~~~~~~~~~^^^ IndexError: list index out of range ```
sharkwouter commented 2 months ago

I'm not sure if python can work with files with : characters in it. Windows does not support that.

ell1e commented 2 months ago

It seems to work just fine:

~ $ python3
Python 3.12.4 (main, Aug  1 2024, 12:52:32) [GCC 13.2.1 20240309] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.mkdir(":test")
>>> os.listdir(":test")
[]
>>> f = open(":test/bla", "w"); f.write("test"); f.close()
4
>>> os.listdir(":test")
['bla']
>>>
sharkwouter commented 2 months ago

I'll have to investigate this. I don't understand what's going on.