Foldex / AdwSteamGtk

A simple Gtk wrapper for Adwaita-for-Steam
GNU General Public License v3.0
209 stars 5 forks source link

Bug Report: Install and uninstall both fail due to "No such file or directory" #42

Closed BrianAllred closed 1 year ago

BrianAllred commented 1 year ago

This issue is specific to AdwSteamGtk and not the upstream project:

I have checked the Troubleshooting page

Description of Issue:

Install fails with error message. Uninstall fails silently.

Steps to Reproduce:

  1. Click Apply with any (valid) settings
  2. Observe Install: Installer process failed message

  3. Click 3-dot menu -> Uninstall -> Uninstall
  4. Open Steam with a custom theme currently installed and observe theme is still present

CLI Output:

$ flatpak run io.github.Foldex.AdwSteamGtk
F: Not sharing "/usr/share/themes" with sandbox: Path "/usr" is reserved by Flatpak
→ Creating stage directory /tmp/tmpe0n529p2/adwaita
→ Patching Steam Client Library Files...
→ Patching Steam Client Library Files...
Traceback (most recent call last):
  File "/usr/lib/python3.10/shutil.py", line 816, in move
    os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/tmp/tmpe0n529p2/adwaita/libraryroot.custom.css' -> '/home/brian/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamui/libraryroot.custom.css'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/brian/.var/app/io.github.Foldex.AdwSteamGtk/cache/AdwSteamInstaller/extracted/install.py", line 313, in <module>
    patch_client_css(sourcedir, target, "Library")
  File "/home/brian/.var/app/io.github.Foldex.AdwSteamGtk/cache/AdwSteamInstaller/extracted/install.py", line 210, in patch_client_css
    shutil.move(source_css, custom_library)
  File "/usr/lib/python3.10/shutil.py", line 836, in move
    copy_function(src, real_dst)
  File "/usr/lib/python3.10/shutil.py", line 434, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.10/shutil.py", line 254, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpe0n529p2/adwaita/libraryroot.custom.css'

Other Info (Screenshots, etc): Version 1.8 worked great. Ran into this issue when I saw the notification for the 1.9 update.

Foldex commented 1 year ago

Have you symlinked libraryroot somewhere else?

BrianAllred commented 1 year ago

Not that I know of.

Foldex commented 1 year ago

Think I know what it is. Do you have both a Flatpak Steam install and a normal Steam install?

BrianAllred commented 1 year ago

Oh, apparently. I didn't mean to, but yes, it seems so. I uninstalled my system Steam (to use Flatpak) and the error still occurs. I'm assuming there are some leftover files I need to delete.

Foldex commented 1 year ago

The installer normally should handle multiple install locations fine, so it's not an issue on your part. This is a bug in the installer.

If you want a quick fix: Edit ~/.var/app/io.github.Foldex.AdwSteamGtk/cache/AdwSteamInstaller/extracted/install.py Line 210

shutil.move(source_css, custom_library)

change this from move to copy

shutil.copy(source_css, custom_library)

I'll have to draft up a PR upstream to fix this properly.

Foldex commented 1 year ago

Merged in upstream.