Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Banished: Wine extraction failed #605

Open
tastytea opened this issue Jul 5, 2024 · 8 comments
Open

Banished: Wine extraction failed #605

tastytea opened this issue Jul 5, 2024 · 8 comments

Comments

@tastytea
Copy link

tastytea commented Jul 5, 2024

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
Copy link
Owner

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

@tastytea
Copy link
Author

tastytea commented Jul 9, 2024

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 <module>
    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 <module>
    from minigalaxy.ui.window import Window             # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/minigalaxy/ui/window.py", line 6, in <module>
    from minigalaxy.ui.categoryfilters import CategoryFilters
  File "/usr/lib/python3/dist-packages/minigalaxy/ui/categoryfilters.py", line 6, in <module>
    from minigalaxy.ui.filterswitch import FilterSwitch
  File "/usr/lib/python3/dist-packages/minigalaxy/ui/filterswitch.py", line 4, in <module>
    from minigalaxy.ui.gtk import Gtk
  File "/usr/lib/python3/dist-packages/minigalaxy/ui/gtk.py", line 5, in <module>
    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
Copy link

ell1e commented Jul 9, 2024

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
Copy link
Owner

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
Copy link
Author

tastytea commented Aug 7, 2024

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
Copy link
Owner

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

@ell1e
Copy link

ell1e commented Aug 7, 2024

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants