Matoking / protontricks

A wrapper that does winetricks things for Proton enabled games, requires Winetricks.
GNU General Public License v3.0
1.64k stars 36 forks source link

Error on startup #268

Closed Naaboom closed 9 months ago

Naaboom commented 9 months ago

Describe the bug Opening protontricks leads to the error

To Reproduce Steps to reproduce the behavior:

  1. Launch protontricks

Expected behavior Launching protontricks will show a list of steam games to select

System (please complete the following information):

Additional context I have uninstalled and reinstalled it and also tried downloading through flathub but the same error occurs. It didn't cause an error before I updated to the latest version. I forgot which version I was previously on.

Protontricks was closed due to the following error:

Traceback (most recent call last):
  File "/app/lib/python3.11/site-packages/protontricks/cli/util.py", line 149, in wrapper
    return cli_func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/protontricks/cli/main.py", line 264, in main
    steam_app = select_steam_app_with_gui(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/protontricks/gui.py", line 325, in select_steam_app_with_gui
    appid2icon = _get_appid2icon(steam_apps, steam_path=steam_path)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/protontricks/gui.py", line 93, in _get_appid2icon
    with Image.open(original_icon_path) as img:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/PIL/Image.py", line 3280, in open
    raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file '/home/deck/.local/share/Steam/appcache/librarycache/1868140_icon.jpg'

=============

Please include this entire error message when making a bug report.
Log messages:

Running inside Flatpak sandbox, version 1.12.4.
Found Steam directory at /home/deck/.local/share/Steam
Using default Steam Runtime at /home/deck/.local/share/Steam/ubuntu12_32/steam-runtime
WINETRICKS environment variable is not available. Searching from $PATH.
Found 2 Steam library folders
Currently logged-in Steam user: hgfffc6t
Found 3 Steam shortcuts running using Steam compatibility tools
Using 'yad' as GUI provider
Matoking commented 9 months ago

Seems to be a duplicate of #264, though this issue report confirms it's happening on the latest version of Protontricks.

I've made a fix that skips files that Protontricks cannot open, which should fix this problem. Could you uninstall Protontricks and try installing the fix by opening Konsole and running the following command:

flatpak install --user https://dl.flathub.org/build-repo/69855/com.github.Matoking.protontricks.flatpakref

Can you check if this solves the issue?

Also, for curiosity's sake, could you open the /home/deck/.local/share/Steam/appcache/librarycache/1868140_icon.jpg file (eg. using Dolphin file browser) and check if you can view the image?

Shockwave508 commented 9 months ago

Can you also tweak Protontricks so it ignores Steam appmanifests that no longer exist (or are considered "corrupt"), post-uninstall? See also: #255 . Such an issue forces me to keep certain undesired games installed so I can keep using the app.

maddox commented 9 months ago

@Matoking that gets a 404

Matoking commented 9 months ago

Can you also tweak Protontricks so it ignores Steam appmanifests that no longer exist (or are considered "corrupt"), post-uninstall? See also: #255 . Such an issue forces me to keep certain undesired games installed so I can keep using the app.

@Shockwave508 Could you add your findings under that issue? Protontricks iterates the directory for a list of files and then reads each one. In this situation the latter operation returns a "File not found" error which is obviously nonsensical and has indicated filesystem corruption in the past. If there is a reliable way to reproduce that error, it would be better to find out what's happening and potentially resolve the underlying problem. File system corruption (possibly due to hardware faults) shouldn't obviously happen during normal use and Protontricks doesn't attempt to ignore such errors, as masking the error might cause more problems later on.

@Matoking that gets a 404

I've started a new build here, see the latest comment:

https://github.com/flathub/com.github.Matoking.protontricks/pull/99

The command at the moment of writing is

flatpak install --user https://dl.flathub.org/build-repo/70553/com.github.Matoking.protontricks.flatpakref

The test builds are stored by Flathub for a limited amount of time, unfortunately. If you can use pipx instead of Flatpak, it might be easier to install the test version using pipx like so:

pipx install --force git+https://github.com/Matoking/protontricks.git@lenient_jpeg_parse

If you received the same error as OP, could you check that the build solves it?

Naaboom commented 9 months ago

Hi sorry about the late reply. I didn't know I would get a response so soon. Could you resend another flatpak link?

I'm also not able to view the image. It says

"Loading '1868140_icon.jpg' failed Loading meta information

Matoking commented 9 months ago

Hi sorry about the late reply. I didn't know I would get a response so soon. Could you resend another flatpak link?

I'm also not able to view the image. It says

"Loading '1868140_icon.jpg' failed Loading meta information

You can install using the following command:

flatpak install --user https://dl.flathub.org/build-repo/71509/com.github.Matoking.protontricks.flatpakref
Naaboom commented 9 months ago

You can install using the following command:

flatpak install --user https://dl.flathub.org/build-repo/71509/com.github.Matoking.protontricks.flatpakref

It works now! Thank you for your patience.