itchio / itch

🎮 The best way to play your itch.io games
https://itch.io/app
MIT License
2.37k stars 211 forks source link

RAR packed Linux game doesn't run when installed from itch client #2157

Open akien-mga opened 6 years ago

akien-mga commented 6 years ago

I've tried to install the game Monstrüous on Linux today via the itch client, but it gives the error "Nothing that can be launched was found."

In the installation folder, I have the following files (as expected, it's a Godot game shipped as a .x86_64 Linux binary and a .pck data back:

$ ls -l
total 294368
-rw-rw-rw- 1 akien akien 269216500 Oct  7 20:41 monstruous_v0.9_LINUX.pck
-rw-rw-rw- 1 akien akien  32206310 Oct  7 20:41 monstruous_v0.9_LINUX.x86_64

The binary lacks executable bit, but adding it doesn't solve the issue:

./monstruous_v0.9_LINUX.x86_64 
bash: ./monstruous_v0.9_LINUX.x86_64 : impossible d'exécuter le fichier binaire : Erreur de format pour exec()

(Approx. translation: "impossible to run the binary file: Format error for exec()")

file is confused too:

$ file *
monstruous_v0.9_LINUX.pck:    data
monstruous_v0.9_LINUX.x86_64: data

Yet, downloading the original RAR archive from https://nonomiyo.itch.io/monstruous and extracting it with unrar x (5.50) yields a working binary:

$ ls -l monstruous_v0.9_LINUX.*
-rw-r--r-- 1 akien akien 269216500 Oct  7 10:24 monstruous_v0.9_LINUX.pck
-rw-rw-r-- 1 akien akien 172138518 Oct  7 21:39 monstruous_v0.9_LINUX.rar
-rwxr-xr-x 1 akien akien  32206310 Oct  7 10:23 monstruous_v0.9_LINUX.x86_64*
$ file monstruous_v0.9_LINUX.*
monstruous_v0.9_LINUX.pck:    data
monstruous_v0.9_LINUX.rar:    RAR archive data, v5
monstruous_v0.9_LINUX.x86_64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=b85ec8af2cb0f3ee13b051e0612a17dd43d452f1, not stripped

And the game runs fine. Also works when unarchiving with unar (1.10.1).

akien-mga commented 6 years ago

Actually, as I wrote this issue, it seemed strangely familiar. And indeed I already reported the same issue with another game in the past: #1881.

I've just tested with p7zip (16.02) and it indeed can't extract such RAR 5 file properly.

Feel free to close as duplicate of #1881, and I'll ping the game author to ask them to use another format than RAR.

Might be worth preventing the use of RAR (or "RAR 5") altogether on itch though if 7z can't handle it?

aaronfranke commented 5 years ago

Experiencing this issue with Reynard, it seems like the files get corrupted, or at least the MIME type does.

When I download via the website and extract manually, the files look like this in my file manager:

1

When I download via the Itch app, the files look like this in my file manager:

2

If I run the version downloaded from the website, it works fine. If I run the version downloaded via the Itch app, this happens:

$ ./Reynard.x86_64 
bash: ./Reynard.x86_64: cannot execute binary file: Exec format error

It's not just the binary though, all files get corrupted. If I copy the working executable into the Itch folder, keeping the corrupted _Data folder, I get this error when launching:

$ ./Reynard.x86_64 
Set current directory to /home/aaronfranke/Downloads/reynard
Found path: /home/aaronfranke/Downloads/reynard/Reynard.x86_64
Unable to load mono library from /home/aaronfranke/Downloads/reynard/Reynard_Data/Mono/x86_64/libmono.so
Failed to load mono

And the data files also show up as question marks in my file manager:

3

fasterthanlime commented 5 years ago

@aaronfranke Yup, looks like the same issue. The long-term fix probably involves preventing developers from uploading .rar files in the first place, and automatically converting rar5 uploads to something else, but in the mean time, please reach out to the developers and ask them to upload their game with https://itch.io/docs/butler instead - it seems particularly relevant for Reynard, which is is in early access!