CapitaineJSparrow / steam-repo-manager

GUI interface on top of https://steamdeckrepo.com/ to install boot videos on your steam deck
GNU General Public License v3.0
69 stars 4 forks source link

Issues loading on SteamDeck #19

Closed remorsecodex closed 1 year ago

remorsecodex commented 1 year ago

Installed from Discover, launched it and it shows the Repo Manager icon at the bottom for a second, then a new Python window opens (labelled Steam Deck Repo Manager) that's plain white inside and has a loading circle that goes forever.

Brand new steamdeck, no other known issues.

CapitaineJSparrow commented 1 year ago

Hello, idk what's goind on your end. I know there thousands of people using the application without issues and steam deck repo uptime is 100% since last year. I can't troubleshoot your network issue, but you can try to run the application with command line using

flatpak run com.steamdeckrepo.manager

to see if logs are saying something useful. Feel free to reopen with more details

remorsecodex commented 1 year ago

Thanks, I'll check that out when I'm home.

There was a review in the Discover store expressing the same issue, and a couple reddit threads also but none with any idea what's happening.

I'll investigate more as suggested and hopefully come back with more information once I've dug.

3FingerGaming commented 1 year ago

Having the same issue, came up with this on the console

Seem to be getting failed to load module "Canberra-gtk-module"

And file not found for ###/uioverrides/movies

TinCatFood commented 1 year ago

Same issue, here is a more detailed view from the console

(main.py:3): Gtk-WARNING **: 09:54:40.297: Locale not supported by C library. Using the fallback 'C' locale. Gtk-Message: 09:54:40.297: Failed to load module "canberra-gtk-module" 1.0.10 Downloaded in 4.095088958740234 seconds Traceback (most recent call last): File "/app/ui/widgets/main_window.py", line 105, in on_videos_downloaded installed_videos = list_installed_videos() File "/app/utils/init.py", line 20, in list_installed_videos files = [slugify(f.name) for f in Path(movies_path).iterdir() if f.is_file()] File "/app/utils/init.py", line 20, in files = [slugify(f.name) for f in Path(movies_path).iterdir() if f.is_file()] File "/usr/lib/python3.10/pathlib.py", line 1017, in iterdir for name in self._accessor.listdir(self): FileNotFoundError: [Errno 2] No such file or directory: '/home/deck/.steam/root/config/uioverrides/movies'

Edit: I fixed the problem by creating the missing folders in root/config/

CapitaineJSparrow commented 1 year ago

@denilsonsa Your toughts about this report above ? https://github.com/CapitaineJSparrow/steam-repo-manager/blob/main/utils/__init__.py#L21 The function is specifically checking that directory exists to prevent issues but seems not working here ..

CapitaineJSparrow commented 1 year ago

I'm pusing this commit as a fix, https://github.com/CapitaineJSparrow/steam-repo-manager/commit/6433260960ae7371bcf0ec8b330eb4573f061170 hopefully it will fix your issues. Meanwhile creating the directory /home/deck/.steam/root/config/uioverrides/movies manually should fix loading issue

CapitaineJSparrow commented 1 year ago

The version 1.0.11 has been deployed and should fix your loading issues, make sure to let me know if it works https://flathub.org/apps/com.steamdeckrepo.manager

denilsonsa commented 1 year ago

@denilsonsa Your toughts about this report above ?

By looking at the stacktrace, the error is at the list comprehension at line 20, which indicates it is code from commit 40f226802375aabeeb8529337a9435e165b50902, from 2 weeks ago (2023-04-18). Because a commit on the following day 6a77829640c6519e653012e3ec786c976cd2ea4f added a check for the directory path. Maybe the latest available version on flathub had one commit but not the other?

From my eyes, both if not os.path.exists(movies_path): return [] and the newer 6433260960ae7371bcf0ec8b330eb4573f061170 should have prevented this bug. Thus, this sounds like outdated code was installed on those machines (either because the code wasn't updated by the user, or because the latest version on flathub was already outdated).

CapitaineJSparrow commented 1 year ago

At least the code deployed today should force the path to be created automatically, I think it fixes issue itself but if it doesn't restart the app shouldn't have bug since directory is created for sure.

Another question @denilsonsa do you think it's possible to handle pythons crashes and show a popup with infos to submit a report here automatically ? It's sad it took 2 weeks to get a proper stacktrace to debug the issue

denilsonsa commented 1 year ago

Another question @denilsonsa do you think it's possible to handle pythons crashes and show a popup with infos to submit a report here automatically ?

I think it is possible. I don't know precisely the details on how to do that. It is worth investigating. Here are some ideas (completely untested):

Option 1: Put a try: except: block around the main GUI loop, or even including the initialization. Catches any exception, but since we're out of the GUI loop, it may happen we don't have a working UI anymore, thus the challenge would be on how to display the error and stack trace to the user.

Option 2: Figure out if the GUI toolkit has any "global exception handler" thingie, and write our code in there. That's just a wild guess, not sure if toolkits provide it. If they do, that means we can catch the exception and still have a working GUI.

Option 3: We can add our own decorator for uncaught exception handling on many of our functions. That is likely too much work, as inevitably someday the exception will be raised on a stacktrace that doesn't pass through our decorator. Thus, although theoretically possible, I don't like this idea.

Option 4: Look around how other projects handle that, and also search on stackoverflow. :)

CapitaineJSparrow commented 1 year ago

Closing since last update fixed issue probably