Heroic-Games-Launcher / HeroicGamesLauncher

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
https://heroicgameslauncher.com
GNU General Public License v3.0
8.27k stars 437 forks source link

[macOS] Unhandled Exception when trying to uninstall amazon games that are 'not available' #4127

Open L-i-v-y opened 4 days ago

L-i-v-y commented 4 days ago

Describe the bug

Heroic fails to uninstall amazon games that have been deleted on the drive (reported by Heroic as 'not available') and fails to execute script 'cli' due to unhandled exception. Games will remain as 'not available' after attempting to uninstall.

Add logs

[11/18/2024, 3:19:42 PM] NILE_CONFIG_PATH="path/to/user/Library/Application Support/heroic/nile_config" /Applications/Heroic.app/Contents/Resources/app.asar.unpacked/build/bin/arm64/darwin/nile uninstall amzn1.adg.product.2394d92a-ab59-49d5-a9d2-bb98cbae22a8

WARNING [UNINSTALL]:     Missing file "/path/to/game/file" - skipping

[repeated lines obfuscated]

Traceback (most recent call last):

  File "nile/cli.py", line 354, in <module>

  File "nile/cli.py", line 341, in main

  File "nile/cli.py", line 256, in handle_uninstall

  File "nile/utils/uninstall.py", line 46, in uninstall

FileNotFoundError: [Errno 2] No such file or directory: '/path/to/game/directory'

[PYI-39812:ERROR] Failed to execute script 'cli' due to unhandled exception!

[11/18/2024, 3:19:48 PM] NILE_CONFIG_PATH="path/to/user/Library/Application Support/heroic/nile_config" /Applications/Heroic.app/Contents/Resources/app.asar.unpacked/build/bin/arm64/darwin/nile library sync

INFO [LIBRARY]:  Synchronizing library

INFO [LIBRARY]:  Successfully synced the library

Steps to reproduce

  1. Install any amazon game
  2. Close Heroic
  3. Go to folder of installed game in file browser
  4. Delete game folder manually
  5. Launch Heroic
  6. Heroic will show game as 'not available'
  7. Try to uninstall 'not available' game

Expected behavior

Game will stop being reported as installed/'not available'

Screenshots

No response

Heroic Version

Latest Stable

System Information

Additional information

No response