Matoking / protontricks

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

Doesn't work on Ubuntu 19.10 #54

Closed vadi2 closed 4 years ago

vadi2 commented 4 years ago

It fails with:

protontricks 261550 dotnet472
Traceback (most recent call last):
  File "/home/vadi/.local/bin/protontricks", line 8, in <module>
    sys.exit(main())
  File "/home/vadi/.local/pipx/venvs/protontricks/lib/python3.7/site-packages/protontricks/cli.py", line 150, in main
    steam_lib_paths=steam_lib_paths
  File "/home/vadi/.local/pipx/venvs/protontricks/lib/python3.7/site-packages/protontricks/steam.py", line 791, in get_steam_apps
    steam_apps += get_custom_windows_shortcuts(steam_path=steam_path)
  File "/home/vadi/.local/pipx/venvs/protontricks/lib/python3.7/site-packages/protontricks/steam.py", line 709, in get_custom_windows_shortcuts
    steamid3 = find_current_steamid3(steam_path)
  File "/home/vadi/.local/pipx/venvs/protontricks/lib/python3.7/site-packages/protontricks/steam.py", line 659, in find_current_steamid3
    content = f.read()
  File "/usr/lib/python3.7/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 1: invalid continuation byte
vadi2 commented 4 years ago

All my games are installed on /media/vadi/SSDer/steamapps, though that doesn't look like it should matter for this error.

Matoking commented 4 years ago

It seems to be choking on ~/.steam/steam/config/loginusers.vdf for some reason.

Could you copy the contents of that file here (use gist.github.com if it's long)? It should contain a list of public IDs and usernames of the logged-in users like this:

"users"
{
    "76561197997662271"
    {
        "AccountName"       "matoking"
        "PersonaName"       "Matoking"
        "RememberPassword"      "1"
        "mostrecent"        "1"
        "Timestamp"     "1587190395"
        "WantsOfflineMode"      "0"
    }
}
vadi2 commented 4 years ago

Mine seems to be... special.

cat ~/.steam/steam/config/loginusers.vdf
"�Z��EH�~D]��h���ep���E�[j�T�ae�H)Ml;��Mm<�_��y:�䭈�]�;A�Q��������$��b_���k�z�D��B��tF��2��pmnj�]?���U��$r�^[����"
{
    "���!s��Id"     "�!7v����ٽ�I�J���"
    "76561198028255388"
    {
        "AccountName"       "vadi2"
        "PersonaName"       "Vadi.linux"
        "RememberPassword"      "1"
        "mostrecent"        "1"
        "Timestamp"     "1587098939"
        "WantsOfflineMode"      "0"
        "SkipOfflineModeWarning"        "0"
    }
}

Steam and everything works just fine, though.

lucifertdark commented 4 years ago

Perhaps it's time to delete that file & have Steam regenerate it? Make a backup just in case that doesn't work.

Matoking commented 4 years ago

I'd test renaming the file and restarting Steam to see if it gets replaced with a proper VDF file. If it happens again, I'd guess Steam is writing garbage for some reason and discarding it every time upon startup? In that case, I'd look into searching through Steam for Linux repo and creating an issue report if one doesn't exist already.

vadi2 commented 4 years ago

That worked, the file is readable by protontricks now. Thanks!

JustALittleCrazyTalk commented 4 years ago

Had this same issue and same solution.

This is obviously a Steam issue and you can't fix it, but it might be a good idea if the error message just said the file is corrupt?