DavidoTek / ProtonUp-Qt

Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface.
https://davidotek.github.io/protonup-qt
GNU General Public License v3.0
1.18k stars 39 forks source link

No game list in Nobara #235

Closed Martinligabue closed 7 months ago

Martinligabue commented 1 year ago

Please fill out following when reporting a new bug:

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Open ProtonU-Qt
  2. Click game list on Steam

Expected behavior
you should see the list of games installed in steam

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context
Appimage works flawlessly

Terminal output

ProtonUp-Qt 2.8.0 by DavidoTek. Build Info: built from source.
Python 3.11.3 (main, Apr  5 2023, 00:00:00) [GCC 12.2.1 20221121 (Red Hat 12.2.1-4)], PySide 6.5.0
Platform: Nobara Linux 37 (Thirty Seven) Linux-6.2.12-200.fsync.fc37.x86_64-x86_64-with-glibc2.36
qt.dbus.integration: Could not connect "org.freedesktop.IBus" to globalEngineChanged(QString)
Loading locale it / it_IT
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
cat: /etc/lsb-release: File o directory non esistente
Loaded ctmod SteamTinkerLaunch
cat: /etc/lsb-release: File o directory non esistente
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.
Error getting ctool map from appinfo.vdf: Invalid magic, got b'(DV\x07'
Error updating SteamApp info from appinfo.vdf: Invalid magic, got b'(DV\x07'
Gamepad error: No gamepad found.
qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.

only last line appeared after clicking "show game list"

DavidoTek commented 1 year ago

Thanks for reporting the issue.

That's quite strange, it seems to be the same issue as in https://github.com/DavidoTek/ProtonUp-Qt/issues/155.


Can you open a terminal and run following command to show the version of the Steam library: python3 -c "import steam; print(steam.__version__)" What is the output of the command?

Martinligabue commented 1 year ago

1.4.3

ps. I found that he solved by updating to 1.4.4, https://github.com/DavidoTek/ProtonUp-Qt/issues/155#issuecomment-1345661908

how can I do that? should I subscribe to beta client?

image

DavidoTek commented 1 year ago

1.4.3

Okay, that seems to be the issue then. I wonder why Nobara ships with this old version...

ps. I found that he solved by updating to 1.4.4, # 155 how can I do that?

Nobara is probably using the same version of the Steam library as Fedora, which is still v1.4.3: https://src.fedoraproject.org/rpms/python-steam I think the best solution (that can't break anything else on the system) would be to install ProtonUp-Qt via Flatpak or AppImage.

should I subscribe to beta client?

That isn't necessary as the version of the Steam library is independent of the Steam client.

Martinligabue commented 1 year ago

Thanks, I'll use the appimage until next version.

Should this issue be closed now? I'm not really familiar with issues in github.

DavidoTek commented 1 year ago

Should this issue be closed now?

I think it's completed from our side.

I'm not sure whether the issue should be reported on Nobara's side as it is installing ProtonUp-Qt directly even though the dependencies Fedora includes are too old (1.4.3 instead of 1.4.4). Maybe Nobara should preinstall the official Flatpak instead, that would prevent this kind of issues, but on the other hand increase the install size...

GloriousEggroll commented 1 year ago

We already ship the latest version of protonup-qt (2.8.0):

https://copr.fedorainfracloud.org/coprs/gloriouseggroll/nobara/build/5774049/

which was provided over a month ago. also, the package in question is python-steam, which comes from fedora:

$ sudo dnf list installed | grep -i steam
[sudo] password for tcrider: 
python3-steam.noarch                                      1.4.3-2.fc38                                   @fedora                                                                   
steam.i686                                                1.0.0.76-1.fc38                                @rpmfusion-nonfree                                                        
steam-devices.i686                                        1.0.0.76-1.fc38                                @rpmfusion-nonfree           

and is already at it's latest version, there IS NO 1.4.4, so I'm not sure where that user got 1.4.4 from:

https://github.com/ValvePython/steam/tags

By doing this:

https://github.com/DavidoTek/ProtonUp-Qt/pull/157

You've bumped it to a requirement for a version that has not been released yet to any distro, essentially -requiring- users to use the git-built version or backport the patch. I have no problem doing that for Nobara but it's going to be the same for any other distro that packages based on latest tagged release.

GloriousEggroll commented 1 year ago

Update:

This is partially valve's fault, they bumped the version without tagging it:

https://github.com/ValvePython/steam/commit/dd147db07f6797b787633cb90a8e9222dcb8b2f2

GloriousEggroll commented 1 year ago

Update 2:

Even after fully updating python-steam and protonup-qt i was getting this with the show games list button:

Traceback (most recent call last):
  File "/usr/lib64/python3.11/site-packages/pupgui2/pupgui2.py", line 347, in btn_show_game_list_clicked
    gl_dialog = PupguiGameListDialog(install_directory(), self.ui)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pupgui2/pupgui2gamelistdialog.py", line 40, in __init__
    self.setup_ui()
  File "/usr/lib64/python3.11/site-packages/pupgui2/pupgui2gamelistdialog.py", line 50, in setup_ui
    self.setup_steam_list_ui()
  File "/usr/lib64/python3.11/site-packages/pupgui2/pupgui2gamelistdialog.py", line 81, in setup_steam_list_ui
    self.update_game_list_steam()
  File "/usr/lib64/python3.11/site-packages/pupgui2/pupgui2gamelistdialog.py", line 154, in update_game_list_steam
    p.loadFromData(pkgutil.get_data(__name__, file))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/pkgutil.py", line 640, in get_data
    return loader.get_data(resource_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 1130, in get_data
IsADirectoryError: [Errno 21] Is a directory: '/usr/lib64/python3.11/site-packages/pupgui2/resources/img/'

I then looked up the docs on pkgutil.get_data:

https://docs.python.org/3/library/pkgutil.html

which notes the syntax is:

pkgutil.get_data(package, resource)

So I changed this line:

p.loadFromData(pkgutil.get_data(__name__, os.path.join('resources/img', awacy_icon)))

to this:

p.loadFromData(pkgutil.get_data('resources/img', awacy_icon))

and now it shows the games list properly

DavidoTek commented 1 year ago

This is partially valve's fault, they bumped the version without tagging it: ValvePython/steam@dd147db

I've noticed that too, I'm not sure why they didn't create the tag. It looks like they only changed the one issue and didn't bother to create a tag for that...

I have no problem doing that for Nobara but it's going to be the same for any other distro that packages based on latest tagged release.

That would be good. Ideally the upsteam Fedora repository should also update the dependency.


Even after fully updating python-steam and protonup-qt i was getting this with the show games list button which notes the syntax is: pkgutil.get_data(package, resource)

I think the syntax should be correct like this. When __name__ (here pupgui2.gamelistdialog) is supplied for the package, it will get the containing directory of that file and join it with the path supplied in resource, resulting in .../pupgui2/resources/img/...

The issue IsADirectoryError: [Errno 21] Is a directory: '/usr/lib64/python3.11/site-packages/pupgui2/resources/img/'

It seems like it builds the path correctly, but in your case, for some reason the name of the image file is missing and instead tries to open the folder instead. When you supply "resources/img" as the package, it would cause a KeyError, but it is internally handled and get_data returns None. That will not prevent the game list dialog from opening, but instead the anti cheat image will not be loaded (can you confirm that? The column Anticheat should show 0 instead of an image).

If that is the case, I wonder what is causing the image name to be empty.

GloriousEggroll commented 1 year ago

yeah correct it does show a number instead of the image. weird.

GloriousEggroll commented 1 year ago

AHA

It's thinking 0 values are null values. If I use:

            if awacy_icon:
                p.loadFromData(pkgutil.get_data(__name__, os.path.join('resources/img', awacy_icon)))

It renders the icons (with 0 values replaced with ? marks ofc). Anything not a 0 shows an icon.

Ended up doing this:

            awacy_tooltip, awacy_icon = self.get_steamapp_awacystatus(game)
            if not awacy_icon:
                awacy_icon = 'awacy_unknown.png'
            if not awacy_tooltip:
                awacy_tooltip = "Anti-Cheat status unknown"

            p.loadFromData(pkgutil.get_data(__name__, os.path.join('resources/img', awacy_icon)))
DavidoTek commented 1 year ago

Okay, that is the problem then. I'm just not sure yet how that could happen. The method get_steamapp_awacystatus should not be able to return an empty string:

https://github.com/DavidoTek/ProtonUp-Qt/blob/57bc86b596f213bb8a2d8a9af565c3e55caa9dc8/pupgui2/pupgui2gamelistdialog.py#L363-L387

It first sets awacy_icon = '', but then checks the status using if..elif..else. All cases are covered... I wonder if setting awacy_icon = 'awacy_unknown.png' in the first place would resolve the issue. Would be strange if it did...

sonic2kk commented 7 months ago

If this is still an issue, maybe we can go with defaulting awacy_icon = 'awacy_unknown.png' in get_steamapp_awacystatus and resolve this issue? I believe the games list issue should now be resolved given the changes made to resolve #226.

The AWACY issue is definitely odd but if it is no longer occurring I think that's the last of this issue resolved, as the Steam dependency has been bumped and any parsing issues or Steam path detection issues should be resolved. If it is still occurring, the above fix may be enough to resolve the problem.

Martinligabue commented 7 months ago

Last time I checked, more or less a month ago, the issue had been resolved, I didn't know it was still open, if someone can confirm it works now, this could be closed. I no longer am using Nobara so I can't confirm right now

GloriousEggroll commented 7 months ago

fwiw in nobara we're still using my patch from https://github.com/DavidoTek/ProtonUp-Qt/issues/235#issuecomment-1550765229, I wanted it to be fixed regardless of steam version dependency:

From 26dfcbb8bb65e0b2ecf01659cc67ad114c3305cc Mon Sep 17 00:00:00 2001
From: GloriousEggroll <gloriouseggroll@gmail.com>
Date: Mon, 15 May 2023 20:53:08 -0600
Subject: [PATCH] really fix
 https://github.com/DavidoTek/ProtonUp-Qt/issues/235

---
 pupgui2/pupgui2gamelistdialog.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pupgui2/pupgui2gamelistdialog.py b/pupgui2/pupgui2gamelistdialog.py
index 12f5678..deb0da7 100644
--- a/pupgui2/pupgui2gamelistdialog.py
+++ b/pupgui2/pupgui2gamelistdialog.py
@@ -150,7 +150,7 @@ class PupguiGameListDialog(QObject):
             lblicon = QLabel()
             p = QPixmap()
             awacy_tooltip, awacy_icon = self.get_steamapp_awacystatus(game)
-            p.loadFromData(pkgutil.get_data(__name__, os.path.join('resources/img', awacy_icon)))
+            p.loadFromData(pkgutil.get_data('resources/img', awacy_icon))
             lblicon.setToolTip(awacy_tooltip)
             lblicon.setPixmap(p)
             lblicon.setAlignment(Qt.AlignCenter)
-- 
2.40.1
sonic2kk commented 7 months ago

Didn't realise Nobara was using a patch, that's good to know.

Though it seems this patch cannot be applied generally, as this will break when running outside of Nobara from the looks of it. The behaviour this fixes on Nobara causes the behaviour at least on my machine (the icon displays as a number i.e. it can't be loaded because pkgutil.get_data('resources/img', awacy_icon) is None).

image

@DavidoTek any thoughts on the best approach going forward for this issue?

GloriousEggroll commented 7 months ago

Didn't realise Nobara was using a patch, that's good to know.

Though it seems this patch cannot be applied generally, as this will break when running outside of Nobara from the looks of it. The behaviour this fixes on Nobara causes the behaviour at least on my machine (the icon displays as a number i.e. it can't be loaded because pkgutil.get_data('resources/img', awacy_icon) is None).

image

@DavidoTek any thoughts on the best approach going forward for this issue?

ah it does the same here, i can remove the patch and double check

GloriousEggroll commented 7 months ago

yeah works fine without the patch, this can be closed Screenshot_20231126_194536

DavidoTek commented 7 months ago

DavidoTek any thoughts on the best approach going forward for this issue? yeah works fine without the patch, this can be closed

I'm still not sure what exactly was causing the problem. Maybe Nobara used a different way of storing the Python resources than the Flatpak version.

Good to know it's fixed now also on Nobara, I will close this issue then.