Closed Keelhauled closed 3 months ago
Looks like it's happening because I still have files in the .local/share/Steam/compatibilitytools.d/
. Probably a rare condition but could be worth checking for.
Having Steam files from a previous installation but no valid Steam install for that type is probably causing the crash as you point out, rather than anything to do with the Flatpak.
Although, I thought we'd be checking for a valid Steam install earlier:
Oh, wait, we default to POSSIBLE_STEAM_ROOTS[0]
, which is the path you gave, ~/.local/share/Steam
.
I guess there isn't a check for Steam being missing. We check for other launchers being missing, but I guess ProtonUp-Qt always expects Steam.
This could be the culprit:
Since ~/.local/share/Steam
does exist. The above code in constants.py
only exists to pick the right Steam install location and assumes Steam (non-flatpak) is installed, but needs to find it from a set of possible paths. However in your case, even though the check in constants.py
fails, ~/.local/share/Steam
does exist.
Perhaps we need a different helper function to call in util.py
on the line linked to check for a valid installation depending on the launcher.
That line is part of a bigger loop that loops through all POSSIBLE_INSTALL_LOCATIONS
:
Each install location is a dictionary with a display_name
key, which distinguishes between different types, such as Steam
, Steam Flatpak
, and Steam Snap
. We could pass this dictionary to a helper function instead of using os.path.exists
, and the helper function will perform checks depending on the launcher type. We could further break this down, grabbing the path off this dictionary and then checking if certain files we need exist at a given path (such as grabbing the Steam install path and checking if a config.vdf
exists). We don't actually care if Steam is installed per se, just if the files we need per-launcher exist (and usually, the files we need are removed if a given program is uninstalled, such as config.vdf
).
I'll take a stab at getting a draft of something ready for this later tonight if no one else is looking at it. No guarantee I'll get the approach right but if I don't end up opening any PR I'll at least note the pitfalls I ran into :-)
Ran into the same issue here, if it helps I copied the missing file from another PC and it worked. The UI displays the native steam location as an option despite there not being a native installation.
Deleting the empty directories (i.e. removing all of ~/.local/share/Steam
if it is entirely unused, or wherever your Steam path was) would've also solved the problem, instead of copying the files over. This would also resolve the UI displaying the install location.
The issue is that right now ProtonUp-Qt only looks to see if the Steam directories exist. If they do, it assumes Steam is installed, and when it tries to look for the VDF files it needs, they don't exist and it crashes. #356 is aiming to solve this by introducing a stricter check for these data files, with some other changes included (mainly refactoring some semi-related logic out of constants.py
).
I am a bit curious though as to how a system can end up with these left behind directories. Did you uninstall regular Steam and replace it with Flatpak Steam, and this is just left-behind installation files? Nothing changed in the logic, so if this is the case, it seems there are more user switching to Flatpak Steam, that is, unistalling a previous Steam installation and switching. In other words, a use-case that has suddenly cropped up, which is why I ask. Just curiosity is all :grinning:
Arch linux was having a day the native package wasn't rendering so I uninstalled native and downloaded the flatpak version for troubleshooting.
Interesting, as an Arch user for many years I have never encountered that issue, but makes sense.
Describe the bug
Crash if non-flatpak steam is missing
To Reproduce
Start program without non-flatpak steam -> crash right away
Desktop (please complete the following information):
Terminal output