Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steam not visible and "..." button crashes app on first run #370

Closed
arcanon opened this issue Apr 8, 2024 · 4 comments · Fixed by #371
Closed

Steam not visible and "..." button crashes app on first run #370

arcanon opened this issue Apr 8, 2024 · 4 comments · Fixed by #371
Labels
bug Something isn't working

Comments

@arcanon
Copy link

arcanon commented Apr 8, 2024

Please fill out following when reporting a new bug:

Describe the bug
./ProtonUp-Qt-2.9.1-x86_64.AppImage
ProtonUp-Qt 2.9.1 by DavidoTek. Build Info: Official AppImage by DavidoTek.
Python 3.8.2 (default, Mar 13 2020, 10:14:16) [GCC 9.3.0], PySide 6.2.4
Platform: Ubuntu 22.04 Linux-6.5.0-14-generic-x86_64-with-glibc2.29
Gtk-Message: 14:41:27.549: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:41:27.556: Failed to load module "canberra-gtk-module"
Loading locale en / en_US
Loaded ctmod GE-Proton
Loaded ctmod Wine-GE
Loaded ctmod Boxtron
Loaded ctmod D8VK (nightly)
Loaded ctmod Kron4ek Wine-Builds Vanilla
Loaded ctmod Lutris-Wine
Loaded ctmod Luxtorpeda
Loaded ctmod Northstar Proton (Titanfall 2)
Loaded ctmod Proton Tkg
Loaded ctmod Proton Tkg (Wine Master)
Loaded ctmod Roberta
Loaded ctmod Steam-Play-None
Loaded ctmod SteamTinkerLaunch
Loaded ctmod SteamTinkerLaunch-git
Loaded ctmod vkd3d-lutris
Loaded ctmod vkd3d-proton
Loaded ctmod Wine Tkg (Valve Wine)
Loaded ctmod Wine Tkg (Vanilla Wine)
Loaded ctmod DXVK
Loaded ctmod DXVK Async
Loaded ctmod DXVK (nightly)
qt.pysideplugin: Environment variable PYSIDE_DESIGNER_PLUGINS is not set, bailing out.
qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.
Gamepad error: No gamepad found.
qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.
Traceback (most recent call last):
File "/tmp/.mount_ProtonIvo955/usr/lib/python3.8/site-packages/pupgui2/pupgui2.py", line 381, in btn_manage_install_locations_clicked
customid_dialog = PupguiCustomInstallDirectoryDialog(install_directory(), parent=self.ui)
File "/tmp/.mount_ProtonIvo955/usr/lib/python3.8/site-packages/pupgui2/pupgui2customiddialog.py", line 32, in init
self.setup_ui()
File "/tmp/.mount_ProtonIvo955/usr/lib/python3.8/site-packages/pupgui2/pupgui2customiddialog.py", line 53, in setup_ui
self.set_selected_launcher(self.install_locations_dict[self.launcher] or 'steam') # Default combobox selection to "Steam" if unknown launcher for some reason
KeyError: ''

  • Platform: Desktop Ubuntu 22.04
  • Version: For example ProtonUp-Qt 2.9.1
  • How did you install ProtonUp-Qt?: same error for Flatpak / AppImage
@arcanon arcanon added the bug Something isn't working label Apr 8, 2024
@arcanon arcanon changed the title Steam not visible and "..." crashes app on first run Steam not visible and "..." button crashes app on first run Apr 8, 2024
@sonic2kk
Copy link
Contributor

sonic2kk commented Apr 8, 2024

Can't reproduce with Flatpak or AppImage v2.9.1, or running from source @ 6cf1def.

Steam not being visible likely means that ProtonUp-Qt cannot find your Steam installation. Where is Steam installed on your PC?

I think the KeyError: '' is coming from Steam not being found when you try to add a custom install directory, and thus causing a crash. I haven't confirmed this, though.

@sonic2kk
Copy link
Contributor

sonic2kk commented Apr 8, 2024

Confirmed that if no valid launchers are found, trying to open the Custom Install Directory dialog results in a crash.

The KeyError is coming from self.launcher being blank, and we're attempting to use this as a key to access the launcher to select by default. When you open the Custom Install Dialog with Steam selected it will default the selection to Steam, if Lutris is selected it will select Lutris, and so on, as a bit of context-aware behaviour.

It is supposed to fall back to 'steam' if the launcher is unknown, but the logic we use to do this doesn't work. It seems like if you try to do dictionary[key] or alternative_value, Python will not gracefully handle keys that do not exist. This is unlike an inline if. For example:

  • dictionary[key] or 'Steam' will give a KeyError
  • dictionary[key] if key in dictionary else 'Steam' will give 'Steam'

I have a fix in mind that will update this check to be like the working example above (this appears to be where the crash happens):

self.set_selected_launcher(self.install_locations_dict[self.launcher] or 'steam') # Default combobox selection to "Steam" if unknown launcher for some reason


Provided the above fix can work, this will not resolve the issue of Steam not being found for you. It would be good to know where Steam is installed. Does it match any of these locations? These are where ProtonUp-Qt checks:

  • ~/.local/share/Steam
  • ~/.steam/root
  • ~/.steam/steam
  • ~/.steam/debian-installation - This is very common on Debian-based systems
  • ~/.var/app/com.valvesoftware.Steam/data/Steam/ - This is the Steam Flatpak
  • ~/snap/steam/common/.steam/root/ - This is the Steam Snap, which Valve have asked users to avoid using. It is possible that with Canonical's push for Snaps, this may have unknowingly been used by default on your system and you may want to try an alternative Steam installation.

@sonic2kk
Copy link
Contributor

The crash should be fixed in v2.9.2 (only available as AppImage right now), although still not sure why ProtonUp-Qt couldn't find Steam.

@arcanon
Copy link
Author

arcanon commented Apr 11, 2024

steam was not installed yet, that was my bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants