Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

egl-sync: EGS ProgramData path does not exist #623

Open
Lasa2 opened this issue Nov 15, 2023 · 5 comments
Open

egl-sync: EGS ProgramData path does not exist #623

Lasa2 opened this issue Nov 15, 2023 · 5 comments

Comments

@Lasa2
Copy link

Lasa2 commented Nov 15, 2023

The egl-sync command fails if you never installed a game via the EGL. The EGL does not create the Manifests directory by default.

Platform

Operating system and version: Windows 11 Pro Build 22621.2134
Legendary version (legendary -V): Legendary v0.20.33 - "Undue Alarm"

Expected Behavior

legendary egl-sync should sync the installed games to EGL

Current Behavior

legendary is unable to sync installed games due to:

Traceback (most recent call last):
File "legendary\cli.py", line 3137, in
File "legendary\cli.py", line 3072, in main
File "legendary\cli.py", line 1510, in egs_sync
File "legendary\core.py", line 1766, in egl_get_exportable
File "legendary\core.py", line 560, in get_installed_list
File "legendary\core.py", line 1933, in egl_sync
File "legendary\core.py", line 1883, in egl_restore_or_uninstall
File "legendary\core.py", line 1860, in egl_export
File "legendary\lfs\egl.py", line 85, in set_manifest
ValueError: EGS ProgramData path does not exist
[15796] Failed to execute script 'cli' due to unhandled exception!

Steps to Reproduce

  1. install the Epic Games Launcher e.g. by winget install EpicGames.EpicGamesLauncher
  2. login into the Epic Games Launcher
  3. complete legendary auth
  4. install any game via legendary install
  5. run legendary egl-sync

Additional information

This crash is resolvable by either creating the Manifests directory by hand or install a game via EGL.

@Lasa2
Copy link
Author

Lasa2 commented Nov 15, 2023

I just saw that this is collides a bit with #421, so maybe it a good idea to ask if legendary should create the missing dir or disable the egl-sync, as its uncertain if the EGL got uninstalled or just no game got installed via the EGL.

@laurencei
Copy link

I just had this issue now.

"This crash is resolvable by either creating the Manifests directory by hand or install a game via EGL."
@Lasa2 - where exactly did you create the Manifest directory?

@Lasa2
Copy link
Author

Lasa2 commented Jan 2, 2024

Under %PROGRAMDATA%\Epic\EpicGamesLauncher\Data
so that %PROGRAMDATA%\Epic\EpicGamesLauncher\Data\Manifests is a valid path

@Vinfall
Copy link

Vinfall commented Mar 10, 2024

Creating %PROGRAMDATA%\Epic\EpicGamesLauncher\Data\Manifests solves the issue for me but why does legendary still look for it even if I have these in config.ini?

; default install directory
install_dir = D:/Game/Epic
; whether or not syncing with egl is enabled
egl_sync = True
; path to the "Manifests" folder in the EGL ProgramData directory
egl_programdata = D:/Game/Epic/Manifests

legendary install whatever would install to install_dir correctly so I assume it's not related to Windows path escape (\\).

@Lasa2
Copy link
Author

Lasa2 commented Mar 10, 2024

egl_programmdata is only used on non windows machines

# on non-Windows load the programdata path from config
if os.name != 'nt':
self.egl.programdata_path = self.lgd.config.get('Legendary', 'egl_programdata', fallback=None)
if self.egl.programdata_path and not os.path.exists(self.egl.programdata_path):
self.log.error(f'Config EGL path ("{self.egl.programdata_path}") is invalid! Disabling sync...')
self.egl.programdata_path = None
self.lgd.config.remove_option('Legendary', 'egl_programdata')
self.lgd.config.remove_option('Legendary', 'egl_sync')
self.lgd.save_config()

on windows the directory is hardcoded

if os.name == 'nt':
self.appdata_path = os.path.expandvars(
r'%LOCALAPPDATA%\EpicGamesLauncher\Saved\Config\Windows'
)
self.programdata_path = os.path.expandvars(
r'%PROGRAMDATA%\Epic\EpicGamesLauncher\Data\Manifests'
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants