maxisoft / ASFFreeGames

Collect free steam games while asf is running
GNU Affero General Public License v3.0
134 stars 3 forks source link

[BUG] OnUnhandledException() System.MissingMethodException: Method not found: 'System.ReadOnlySpan`1<Char> System.MemoryExtensions.TrimStart(System.ReadOnlySpan`1<Char>, Char)'. #5

Closed JourneyOver closed 1 year ago

JourneyOver commented 1 year ago

Describe the bug

Pretty much title, upon updating to v1.2.5.0 it starts to throw the above error and causes ASF to exit with a nonzero error code..

the full log:

2022-10-24 17:34:15|ArchiSteamFarm-18|INFO|ASF|InitCore() ArchiSteamFarm V5.3.2.2 (linux-x64/67559fba-f19f-4336-bd2f-1dfafae284b3 | .NET 6.0.10; debian.11-x64; Linux 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022)
2022-10-24 17:34:15|ArchiSteamFarm-18|INFO|ASF|InitCore() Copyright © 2015-2022 JustArchiNET
2022-10-24 17:34:17|ArchiSteamFarm-18|INFO|ASF|InitPlugins() Initializing Plugins...
2022-10-24 17:34:17|ArchiSteamFarm-18|INFO|ASF|InitPlugins() Loading ASFEnhance V1.6.16.0...
2022-10-24 17:34:18|ArchiSteamFarm-18|INFO|ASF|OnLoaded() 
==========================================
 █████╗ ███████╗███████╗███████╗███╗   ██╗██╗  ██╗ █████╗ ███╗   ██╗ ██████╗███████╗
██╔══██╗██╔════╝██╔════╝██╔════╝████╗  ██║██║  ██║██╔══██╗████╗  ██║██╔════╝██╔════╝
███████║███████╗█████╗  █████╗  ██╔██╗ ██║███████║███████║██╔██╗ ██║██║     █████╗  
██╔══██║╚════██║██╔══╝  ██╔══╝  ██║╚██╗██║██╔══██║██╔══██║██║╚██╗██║██║     ██╔══╝  
██║  ██║███████║██║     ███████╗██║ ╚████║██║  ██║██║  ██║██║ ╚████║╚██████╗███████╗
╚═╝  ╚═╝╚══════╝╚═╝     ╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝ ╚═════╝╚══════╝
ASFEnhance Version 1.6.16.0
Developed by Chr_, email chr@chrxw.com
https://afdian.net/@chr233
==========================================
Use Command "ASFEVERSION" / "AV" to check the plugin's latest version
Use Command "ASFEUPDATE" / "AU" to update the plugin
==========================================

2022-10-24 17:34:18|ArchiSteamFarm-18|INFO|ASF|InitPlugins() ASFEnhance has been loaded successfully!
2022-10-24 17:34:18|ArchiSteamFarm-18|INFO|ASF|InitPlugins() Loading ASFFreeGamesPlugin V1.2.5.0...
2022-10-24 17:34:18|ArchiSteamFarm-18|INFO|ASF|InitPlugins() ASFFreeGamesPlugin has been loaded successfully!
2022-10-24 17:34:18|ArchiSteamFarm-18|INFO|ASF|InitPlugins() Loading SteamTokenDumperPlugin V5.3.2.2...
2022-10-24 17:34:18|ArchiSteamFarm-18|INFO|ASF|InitPlugins() SteamTokenDumperPlugin has been loaded successfully!
2022-10-24 17:34:18|ArchiSteamFarm-18|INFO|ASF|InitPlugins() You've loaded one or multiple custom plugins into ASF. Since we're unable to offer support for modded setups, please contact the appropriate developers of the plugins that you decided to use in case of any issues.
2022-10-24 17:34:18|ArchiSteamFarm-18|INFO|ASF|UpdateAndRestart() ASF will automatically check for new versions every 12 hours.
2022-10-24 17:34:18|ArchiSteamFarm-18|INFO|ASF|Update() Checking for new version...
2022-10-24 17:34:19|ArchiSteamFarm-18|INFO|ASF|Update() Local version: 5.3.2.2 | Remote version: 5.3.2.2
2022-10-24 17:34:19|ArchiSteamFarm-18|INFO|ASF|Load() Loading STD global cache...
2022-10-24 17:34:19|ArchiSteamFarm-18|INFO|ASF|Load() Validating STD global cache integrity...
2022-10-24 17:34:19|ArchiSteamFarm-18|INFO|ASF|OnASFInit() SteamTokenDumperPlugin has been initialized successfully, thank you in advance for your help. The first submission will happen in approximately 31 minutes from now.
2022-10-24 17:34:19|ArchiSteamFarm-18|INFO|ASF|Start() Starting IPC server...
2022-10-24 17:34:20|ArchiSteamFarm-18|INFO|Microsoft.Hosting.Lifetime|Now listening on: http://[::]:1242
2022-10-24 17:34:20|ArchiSteamFarm-18|INFO|Microsoft.Hosting.Lifetime|Application started. Press Ctrl+C to shut down.
2022-10-24 17:34:20|ArchiSteamFarm-18|INFO|Microsoft.Hosting.Lifetime|Hosting environment: Production
2022-10-24 17:34:20|ArchiSteamFarm-18|INFO|Microsoft.Hosting.Lifetime|Content root path: /app
2022-10-24 17:34:20|ArchiSteamFarm-18|INFO|ASF|Start() IPC server ready!
2022-10-24 17:34:20|ArchiSteamFarm-18|INFO|JourneyOver|Start() Starting...
2022-10-24 17:34:20|ArchiSteamFarm-18|INFO|JourneyOver|Connect() Connecting...
2022-10-24 17:34:21|ArchiSteamFarm-18|INFO|JourneyOver|OnConnected() Connected to Steam!
2022-10-24 17:34:21|ArchiSteamFarm-18|INFO|JourneyOver|OnConnected() Logging in...
2022-10-24 17:34:22|ArchiSteamFarm-18|INFO|JourneyOver|OnLoggedOn() Successfully logged on as 76561198037630370/Journey_Over.
2022-10-24 17:34:22|ArchiSteamFarm-18|INFO|JourneyOver|Init() Logging in to ISteamUserAuth...
2022-10-24 17:34:22|ArchiSteamFarm-18|INFO|JourneyOver|Init() Success!
2022-10-24 17:34:23|ArchiSteamFarm-18|INFO|JourneyOver|Refresh() Retrieving a total of 1 app access tokens...
2022-10-24 17:34:23|ArchiSteamFarm-18|INFO|JourneyOver|Refresh() Retrieving 1 app access tokens...
2022-10-24 17:34:24|ArchiSteamFarm-18|INFO|JourneyOver|Refresh() Finished retrieving 1 app access tokens.
2022-10-24 17:34:24|ArchiSteamFarm-18|INFO|JourneyOver|Refresh() Finished retrieving a total of 1 app access tokens.
2022-10-24 17:34:24|ArchiSteamFarm-18|INFO|JourneyOver|Refresh() Retrieving all depots for a total of 1 apps...
2022-10-24 17:34:24|ArchiSteamFarm-18|INFO|JourneyOver|Refresh() Retrieving 1 app infos...
2022-10-24 17:34:24|ArchiSteamFarm-18|INFO|JourneyOver|IsAnythingToFarm() Checking first badge page...
2022-10-24 17:34:24|ArchiSteamFarm-18|INFO|JourneyOver|Refresh() Finished retrieving 1 app infos.
2022-10-24 17:34:24|ArchiSteamFarm-18|INFO|JourneyOver|Refresh() Retrieving 5 depot keys...
2022-10-24 17:34:24|ArchiSteamFarm-18|INFO|JourneyOver|Refresh() Finished retrieving 5 depot keys.
2022-10-24 17:34:24|ArchiSteamFarm-18|INFO|JourneyOver|Refresh() Finished retrieving all depot keys for a total of 1 apps.
2022-10-24 17:34:25|ArchiSteamFarm-18|INFO|JourneyOver|IsAnythingToFarm() Checking other badge pages...
2022-10-24 17:34:25|ArchiSteamFarm-18|INFO|JourneyOver|StartFarming() We don't have anything to farm on this account!
2022-10-24 17:34:53|ArchiSteamFarm-18|INFO|ASF|CollectGames() [FreeGames] found potentially 25 free games on reddit
2022-10-24 17:34:53|ArchiSteamFarm-18|INFO|JourneyOver|CollectGames() [FreeGames] <JourneyOver> ID: app/1995320 | Status: Fail/AlreadyPurchased

2022-10-24 17:34:53|ArchiSteamFarm-18|FATAL|ASF|OnUnhandledException() System.MissingMethodException: Method not found: 'System.ReadOnlySpan`1<Char> System.MemoryExtensions.TrimStart(System.ReadOnlySpan`1<Char>, Char)'.
   at Maxisoft.ASF.ASFFreeGamesPlugin.BuildInvalidAppPurchaseRegex()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode )
   at System.Lazy`1.ExecutionAndPublication(LazyHelper , Boolean )
   at System.Lazy`1.CreateValue()
   at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGames(IEnumerable`1 bots, CancellationToken cancellationToken)
   at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGamesOnClock(Object source)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object )
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
2022-10-24 17:34:53|ArchiSteamFarm-18|ERROR|ASF|Exit() Exiting with nonzero error code!
2022-10-24 17:34:53|ArchiSteamFarm-18|INFO|Microsoft.Hosting.Lifetime|Application is shutting down...

To Reproduce Steps to reproduce the behavior:

  1. Download the latest release (as of now it is v1.2.5.0) and place in the plugins folder
  2. Start up ASF
  3. Let it try to collect a game
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

for it to try and collect the game and not error out causing ASF to exit

Desktop (please complete the following information):

Additional context When I downgrade to v1.2.4 it does not cause any sort of crashing or error.

maxisoft commented 1 year ago

Thank for reporting, will be fixed in upcomming version 1.2.6.0

maxisoft commented 1 year ago

Issue is fixed in v1.2.6.
I've added integration tests which would report System.MissingMethodException occuring on linux from now on.