tkashkin / GameHub

All your games in one place
https://tkashkin.github.io/projects/gamehub
GNU General Public License v3.0
2.26k stars 129 forks source link

After starting up Gamehub no toolbar shows, with no way to change tabs or edit settings #549

Open 5310 opened 3 years ago

5310 commented 3 years ago
Expected behavior
  1. I launch Gamehub and then an empty window with the blank toolbar and spinner opens.
  2. After a moment the toolbar is populated with buttons, and the main area of the app shows my games.
Actual behavior
  1. I launch Gamehub and then an empty window with the blank toolbar and spinner opens.
  2. After a moment the blank toolbar disappears complete and the main areas shows 'No user-added games' and status toast messages about it loading games from Steam and Itch etc pops up in the bottom-right.

I probably left the app on the user-added games tab the last time I used it, hence the 'No user-added games' message. But without the toolbar I can't switch any tabs or even access the settings.

Steps to reproduce

Just launching Gamehub.

Version and environment
- GameHub
    Version: 0.16.0-3ff389e-master
    Branch:  master
    Commit:  3ff389ea589076815256435971f5a99d593d9448
- Environment
    Distro:  Manjaro Linux
    DE:      KDE
    GTK:     3.24.29

I currently have installed Gamehub through AUR using the package gamehub. I have also tried out the packages gamehub-bin and gamehub-git today to no avail.

I tried to run Gamehub through the official Appimages, but they both fail with [ERROR] [GLib-GIO] Settings schema 'org.appmenu.gtk-module' is not installed.

Furthermore, I've been trying to wipe all my settings for Gamehub just in case something went wrong. I have deleted ~/.config/com.github.tkashkin.gamehub, ~/.local/share/com.github.tkashkin.gamehub, and ~/.cache/com.github.tkashkin.gamehub multiple times and my settings have never reset. It still opens to the user-added games tab with no toolbar and scans Steam and Itch etc that only happens once those accounts are set-up.

tkashkin commented 3 years ago

gamehub-bin

Why would anyone want to repackage a binary package built for Ubuntu, use that and put that in AUR, especially when there are already native Arch packages? That's just weird, it's not like GameHub is proprietary software that is only available as a prebuilt .deb package.

5310 commented 3 years ago

Why would anyone want to repackage a binary package built for Ubuntu, use that and put that in AUR

This might be because some Arch derivatives don't have Gamehub in their own repos. Manjaro sure doesn't, which is why I've been building Gamehub from source since I switched over to it last year.

Try dconf reset -f /com/github/tkashkin/gamehub/ to reset all settings.

So, funnily, doing dconf reset -f /com/github/tkashkin/gamehub/ does nothing to my install either. It just silently completes. However, I installed the dconf Editor GUI and then manually did a recursive reset on /com/github/tkashkin/gamehub/ and it did clear my configs.

Unfortunately, it didn't seem to fix anything. Just sent my back to the onboarding screen that asks me to link Steam etc. For this screen I do still see the toolbar, like it also shows alongside the loading spinner when I launch Gamehub and later disappears. This time the toolbar only disappears if I finish setting up my integrations (or hit skip) and move to the games list. It's the games list that never has the bar.

If window is maximized, try to unmaximize it.

This I've already checked before, especially since I normally hide my window decorators, but had disabled that during testing anyway.

Do you have anything that changes GTK CSDs installed?

But then this made me realize I have some other thing installed that causes this :|

While testing I had already disabled all the things I thought could affect UI things. I normally have window decorations hidden as I run a tiling script, and have appmenu which used to classically cause a lot of issues in Gnome-land but things are better these days I expect. However, I forgot that I also had gtk3-nocsd installed because I didn't want window decorator buttons on my Gtk apps.

Today I went and uninstalled it and logged back in to see that without it installed the game-list toolbar/csd does remain visible.

The thing to note though is that I've had gtk3-nocsd installed since the first day I switched over to Manjaro/KDE and have used Gamehub for just as long, it's worked all this time up until a few weeks ago.

It's hard for me to tell when this change occurred as I haven't launched it in the last few weeks, plus, since I use Gamehub through the AUR I don't get to pull every single update either and did a manual update last week, only after which I noticed this.

Most interesting of all, this problem does not occur with any other CSD app I have installed—

Do you have any similar problems in other GTK apps?

I have been using the dconf Editor GUI app side-by-side with Gamehub while testing this, which is definitely a CSD app, and could always tell it didn't have any issues not showing its CSD-turned-toolbar. Then I realized the thing with gtk3-nocsd. Did the test with it uninstalled, and then reinstalled it again and checked all the other CSD apps I have.

Pamac, Snapper, Bleachbit, are CSD apps I regularly use, and even the Manjaro Hello welcome app that only ever shows up on the first boot, they all work perfectly fine with gtk3-nocsd installed. This tweak package just adds regular window decorations around them, demoting the headerbar into a toolbar that then works as expected.

That also seems to be the case with Gamehub for the onboarding and loading pages, which retain the headerbar-turned-toolbar even with gtk3-nocsd installed. But as soon as Gamehub switches to the games list the bar disappears when I have gtk3-nocsd installed, and stays without it.

Here are some screenshots to illustrate. First off, with gtk3-nocsd installed; notice how the onboarding screen still has the bar, but not the games list, and how dconf Editor still has the bar.

Screenshot_20210517_102731 Screenshot_20210517_102755

And this is some other CSD apps with gtk3-nocsd reinstalled, bars working:

Screenshot_20210517_103002

And this is while I uninstalled gtk3-nocsd, with the headerbar still showing for the games list:

Screenshot_20210517_102218 Screenshot_20210517_102236

As I was saying, the game-list header/toolbar disappearing almost certainly wasn't the case earlier this year, and certainly not all throughout last year. I'm pretty sure gtk3-nocsd itself has not change in the meantime. Did something change with Gamehub?

tkashkin commented 3 years ago

It seems the root cause of this in GameHub is that WelcomeView and GamesView have separate headerbars and they call Window.set_titlebar to replace them. gtk3-nocsd, KWin, or some other component of your system doesn't handle that correctly.

Did something change with Gamehub?

Nothing changed in GameHub recently, there was no updates.


So I don't think it's strictly a GameHub bug as GTK does allow to call Window.set_titlebar multiple times, but there are ways to do it differently without actually replacing headerbars if this causes problems.

Maybe this is an additional reason to use libhandy or to migrate to gtk4 and libadwaita. HdyHeaderBar and AdwHeaderBar do not even use native GTK headerbars.

I'll consider this for the next major release.

I'm pretty sure gtk3-nocsd itself has not change in the meantime.

If everything worked on your system before and you are sure you haven't changed anything it may be worth to report this as a bug to gtk3-nocsd or KDE or whatever else you think may have caused this issue.

5310 commented 3 years ago

I guess it's time to whip out the liveUSB I used to setup my current system and see where that gets me :]

baduhai commented 3 years ago

The bug is definitely related to gtk3-nocsd, I used GameHub perfectly fine on Plasma until earlier today, when I installed gtk3-nocsd and the toolbar disappeared.

5310 commented 3 years ago

On that note, I have made a local .desktop file that launches Gamehub with CSD enabled with GTK_CSD=1 com.github.tkashkin.gamehub.

And I still haven't been able to find when gtk3-nocsd broke for Gamehub. There hasn't been any updates since I started using it last year.