V4.2.2.6 - Needs elevated privileges after update for initial run.
Bug report
Description
Recent automatic upgrade to 4.2.2.6 causes crash, and restarting error.
Expected behavior
Normal operations.
Current behavior
ASF automatically updated and the console window closed, which isn't normal behavior. When manually restarted from the command line throws a fatal error unless run with enhanced privileges.
Steps to reproduce
As stated above.
Full log.txt recorded during reproducing the problem
2020-06-15 19:22:35|ArchiSteamFarm-1732|INFO|ASF|InitASF() ArchiSteamFarm V4.2.2.6 (win-x64/ad33097c-866f-4884-9d76-11308edda165 | Microsoft Windows 10.0.18363)
2020-06-15 19:22:35|ArchiSteamFarm-1732|FATAL|ASF|OnUnhandledException() System.Security.AccessControl.PrivilegeNotHeldException: The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation.
at System.Security.AccessControl.Win32.GetSecurityInfo(ResourceType resourceType, String name, SafeHandle handle, AccessControlSections accessControlSections, RawSecurityDescriptor& resultSd)
at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
at System.Security.AccessControl.NativeObjectSecurity..ctor(Boolean isContainer, ResourceType resourceType, String name, AccessControlSections includeSections, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)
at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory)
at System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections)
at ArchiSteamFarm.Helpers.CrossProcessFileBasedSemaphore.EnsureFileExists()
at ArchiSteamFarm.Helpers.CrossProcessFileBasedSemaphore..ctor(String name)
at ArchiSteamFarm.OS.CreateCrossProcessSemaphore(String objectName)
at ArchiSteamFarm.ASF.InitGlobalConfig(GlobalConfig globalConfig)
at ArchiSteamFarm.Program.InitGlobalConfigAndLanguage()
at ArchiSteamFarm.Program.InitASF(IReadOnlyCollection`1 args)
at ArchiSteamFarm.Program.Init(IReadOnlyCollection`1 args)
at ArchiSteamFarm.Program.Main(String[] args)
at ArchiSteamFarm.Program.<Main>(String[] args)
2020-06-15 19:22:35|ArchiSteamFarm-1732|ERROR|ASF|Exit() Exiting with nonzero error code!
If launched with elevated privs, the error goes away and processing continues. When restarted thereafter with normal privs - it resumes normal operation with no errors.
Thanks for report! 🏆
It seems you are already aware, but I had a similar issue moving to 4.2.3.3. Running as admin allowed the update to process, so all is fine, but wanted to share if it helps.
2020-06-25 08:30:27|ArchiSteamFarm-13828|INFO|ASF|Update() Checking for new version...
2020-06-25 08:30:27|ArchiSteamFarm-13828|INFO|ASF|Update() Local version: 4.2.2.1 | Remote version: 4.2.3.3
2020-06-25 08:30:27|ArchiSteamFarm-13828|INFO|ASF|Update() Changes since V4.2.2.1:
Added Steam Summer Sale 2020 to SalesBlacklist (#1853).
ASF now comes bundled with its first official plugin, SteamTokenDumperPlugin. Check out our wiki for exact details on the plugin, including how to activate it. People using docker might need to rebuild their containers with docker volume rm on old ASF volumes.
We've slightly changed our MatchActively algorithm to increase chance of finding rare matches, you can read more about that on our wiki.
Fixed an issue of ASF running into a possible deadlock with cross-process limiters on Windows machines.
Fixed ASF being unable to fetch app info for non-public apps (e.g. publisher banned).
Latest ASF-ui with new features, improvements and bugfixes.
Updated localization provided by our community.
Usual amount of other core improvements, optimizations and bugfixes.
Includes bugfix for #1862.
2020-06-25 08:30:27|ArchiSteamFarm-13828|INFO|ASF|Update() Downloading new version: 4.2.3.3 (23 MB)... While waiting, consider donating if you appreciate the work being done! :)
2020-06-25 08:30:27|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 0%...
2020-06-25 08:30:28|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 10%...
2020-06-25 08:30:29|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 20%...
2020-06-25 08:30:29|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 30%...
2020-06-25 08:30:29|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 40%...
2020-06-25 08:30:30|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 50%...
2020-06-25 08:30:30|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 60%...
2020-06-25 08:30:30|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 70%...
2020-06-25 08:30:30|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 80%...
2020-06-25 08:30:30|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 90%...
2020-06-25 08:30:31|ArchiSteamFarm-13828|DEBUG|ASF|UrlGetToBinaryWithProgress() 100%
2020-06-25 08:30:31|ArchiSteamFarm-13828|ERROR|ASF|Update() System.IO.FileNotFoundException:
File name: 'System.IO.Compression.ZipFile, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at ArchiSteamFarm.ASF.UpdateFromArchive(ZipArchive archive, String targetDirectory)
at ArchiSteamFarm.ASF.Update(Boolean updateOverride)
at ArchiSteamFarm.ASF.Update(Boolean updateOverride)