Matoking / protontricks

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

Can't open protontricks after deleting and regenerating prefix folder #193

Closed ThePwnd closed 1 year ago

ThePwnd commented 1 year ago

Describe the bug Protontricks GUI fails to open

To Reproduce Steps to reproduce the behavior:

  1. Run command protontricks 252950 --gui
  2. Select default wine prefix
  3. Select the "Delete ALL FILES..." option
  4. Verify that the selected folder is the prefix folder for Rocket League
  5. Click "OK"
  6. Run command protontricks 252950 --gui again, after the previous operation finishes
  7. Command fails and error is displayed referencing lack of prefix folder
  8. Try launching Rocket League from Steam until it gets hung on Microsoft DirectX step of first time setup
  9. Close the first time setup window
  10. Try reinstalling Rocket League on Steam until it gets hung while uninstalling
  11. Logout of Steam
  12. Manually delete Rocket League local files from Steam library folder, including appmanifest file
  13. Log back into Steam to find that Rocket League is still "installed."
  14. Verify integrity of game cache and wait for Steam to redownload files
  15. Run command protontricks 252950 --gui again
  16. Command fails with error citing empty string returned from %AppData%

Expected behavior The protontricks GUI will open to the Rocket League Wine prefix

System (please complete the following information):

Additional context Not related to the error I'm getting now, but if you wanted some context as to why I felt the need to delete the prefix, I am ultimately trying to get BakkesMod working - a third party addon for Rocket League that allows running custom plugins and playing custom maps on multiplayer. After installing and attempting to run the .exe file through Protontricks, I was greeted with a flood of errors citing the import_dll library was missing a bunch of required dependencies. Upon researching this error, I was told to try reinstalling with a clean prefix folder, and it was only after I deleted the folder with protontricks that all of these problems started cropping up.

Additional context related to the above operations is that I can't even open the game from Steam anymore. It says it's running but it never opens. Furthermore, everytime I try to launch it, it goes through the first time setup steps.

I presume you could reproduce the same error with other protontricks commands, and probably by running the same steps on a different Steam app, but I haven't tested either of those hypotheses.

If the error happens when trying to run a Protontricks command, run the command again using the -v flag and copy the output!

protontricks (INFO): Found Steam directory at /home/user/.steam/steam. You can also define Steam directory manually using $STEAM_DIR
protontricks (INFO): Using default Steam Runtime at /home/user/.steam/root/ubuntu12_32/steam-runtime
protontricks (INFO): WINETRICKS environment variable is not available. Searching from $PATH.
protontricks (INFO): Found 2 Steam library folders
protontricks (INFO): Multiple compatdata directories found for app 227300
protontricks (INFO): Multiple compatdata directories found for app 1493710
protontricks (INFO): Multiple compatdata directories found for app 1887720
protontricks (INFO): Multiple compatdata directories found for app 252950
protontricks (INFO): Currently logged-in Steam user: r0ck4l1f3
protontricks (INFO): Couldn't find custom shortcuts. Maybe none have been created yet?
protontricks (INFO): Found active compatibility tool: Proton Experimental
protontricks (INFO): Active compatibility tool is a Proton installation
protontricks (INFO): WINE environment variable is not available. Setting WINE environment variable to Proton bundled version
protontricks (INFO): WINESERVER environment variable is not available. Setting WINESERVER environment variable to Proton bundled version
protontricks (INFO): Using separately installed Steam Runtime: Steam Linux Runtime - Soldier
protontricks (INFO): Running Steam Runtime using bwrap containerization.
If any problems arise, please try running the command again using the `--no-bwrap` flag and make an issue report if the problem only occurs when bwrap is in use.
protontricks (INFO): Created Steam Runtime Wine binary directory at /home/user/.cache/protontricks/proton/Proton Experimental/bin
protontricks (INFO): Attempting to run command ['/usr/bin/winetricks', '--gui']
winetricks GUI enabled, using zenity 3.42.1
Executing mkdir -p /media/user/TheTinderBox/SteamLibrary/steamapps/compatdata/252950
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 36
drwxrwxr-x  9 user user 4096 Dec 15 08:56 .
drwxrwxr-x  4 user user 4096 Dec 15 11:05 ..
drwxrwxr-x  2 user user 4096 Dec 15 11:05 openxr
drwxrwxr-x  4 user user 4096 Dec 15 08:56 ProgramData
drwxrwxr-x  6 user user 4096 Dec 15 08:56 Program Files
drwxrwxr-x  9 user user 4096 Dec 15 10:13 Program Files (x86)
drwxrwxr-x  4 user user 4096 Dec 15 08:56 users
drwxrwxr-x  3 user user 4096 Dec 15 08:56 vrclient
drwxrwxr-x 20 user user 4096 Dec 15 08:56 windows

Registry info:
/media/user/TheTinderBox/SteamLibrary/steamapps/compatdata/252950/pfx/system.reg:#arch=win64
/media/user/TheTinderBox/SteamLibrary/steamapps/compatdata/252950/pfx/user.reg:#arch=win64
/media/user/TheTinderBox/SteamLibrary/steamapps/compatdata/252950/pfx/userdef.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
warning: /home/user/.cache/protontricks/proton/Proton Experimental/bin/wine cmd.exe /c echo '%AppData%' returned empty string, error message "" 
------------------------------------------------------
Matoking commented 1 year ago

The "Delete prefix" option in Winetricks deletes the Wine prefix, but not the compatdata directory that contains the Wine prefix in addition to some other files.

In your case, you'll have to find the Wine prefix for Rocket League (ID 252950) by running the following command:

protontricks -c "echo \$WINEPREFIX" 252950

It should a path such as /mnt/SSD/SteamLibrary/steamapps/compatdata/252950/pfx. You have to delete the compatdata/252950 directory and then relaunch the game for the prefix to be recreated properly.

Matoking commented 1 year ago

Flatpak version of Protontricks now ships a fork of Winetricks where the deletion of Proton Wine prefixes is performed in full.

The fork of Winetricks might be shipped with Protontricks itself in the future, though that will require much more work; the assumption until now has been that the distro provides the Winetricks installation that Protontricks uses.