Coder Social home page Coder Social logo

maxisoft / asffreegames Goto Github PK

View Code? Open in Web Editor NEW
119.0 7.0 2.0 368 KB

Collect free steam games while asf is running

License: GNU Affero General Public License v3.0

C# 100.00%
archisteamfarm asf asf-plugin steam steam-games steam-api plugin netcore reddit reddit-bot

asffreegames's Introduction

ASF-FreeGames

License: AGPL v3 Plugin-ci Github All Releases

Description

ASF-FreeGames is a plugin for ArchiSteamFarm allowing one to automatically collect free steam games πŸ”‘ posted on Reddit.


Requirements

Installation

  • πŸ”½ Download latest Dll from the release page
  • ➑️ Move the dll into the plugins folder of your ArchiSteamFarm installation
  • πŸ”„ (re)start ArchiSteamFarm
  • πŸŽ‰ Have fun

How does it works

Every ⏰30 minutes the plugins starts πŸ”¬analysing reddit for new free games⚾.
Then every πŸ”‘addlicense asf appid commands found are broadcasted to each currently logged bot πŸ’ͺ.

Commands

  • freegames to collect free games right now πŸš€
  • getip to get the ip used by ASF πŸ‘€
  • set to configure this plugin options (see below) πŸ› οΈ

for information about issuing πŸ“’commands see ASF's wiki

Advanced configuration

The plugin behavior is configurable via command

  • freegames set nof2p to β›”prevent the plugin to collect free to play games
  • freegames set f2p to β˜‘οΈallow the plugin to collect f2p (the default)
  • freegames set nodlc to β›”prevent the plugin to collect dlc
  • freegames set dlc to β˜‘οΈallow the plugin to collect dlc (the default)

In addition to the command above, the configuration is stored in a πŸ“–config/freegames.json.config json file, one may πŸ–Š edit it using a text editor to suit its need.

FAQ

Log is full of Request failed after 5 attempts! messages is there something wrong ?

  • There's nothing wrong (most likely), those error messages are the result of the plugin trying to add a steam key which is unavailable. With time those errors should occurs less frequently (see #3 for more details).

Dev notes

Compilation

Simply execute dotnet build ASFFreeGames -c Release and find the dll in ASFFreeGames/bin folder, which you can drag to ASF's plugins folder.

GitHub sponsor

asffreegames's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

asffreegames's Issues

Add Proxy Support for Reddit Requests

Is your feature request related to a problem? Please describe.
Currently, the plugin encounters issues when encountering IP blocks from Reddit. This can prevent users from accessing the functionality that relies on Reddit data.

Describe the solution you'd like
We propose implementing proxy support within the plugin. This would allow users to specify a proxy address and port in the configuration, enabling the plugin to utilize the proxy for Reddit API requests.

Describe alternatives you've considered
While some users might resort to VPNs to bypass IP blocks, a dedicated proxy solution within the plugin offers a more controlled and user-friendly approach.

Additional context
Ensuring compatibility with ASF's trimmed version to avoid MissingMethodException errors is crucial during development. Additionally, clear documentation on configuring and using proxy settings should be provided for users.
The issue that's linked to this feature request is: #75

Benefits

Users with blocked IPs can continue using the plugin without relying on VPNs.
Increased overall plugin reliability and robustness.

Getting stuck on trying to request one game

Describe the bug
A clear and concise description of what the bug is.

Just installed this after using ASFclaim for the longest time as I had been looking for something that just was a plugin instead for ASF instead of running a script.. Anyways not sure what is going on, it seems it started up just fine and it said it found 22 free games on reddit and started going through them but then it got to one and it just sits there and fails 5 times (Fail/Timeout) and stops until 30 minutes pass and then it tries to claim the same thing again but once again it just fails the 5 times (Fail/Timeout) and stops.

This seems to be the game/sub in particulur that it is failing on https://steamdb.info/sub/730490/

To Reproduce
Steps to reproduce the behavior:
Not really sure on how to reproduce as I already owned the sub/game that this is failing on, since I got it through when I had ASFclaim running.

Expected behavior
For it to see that it can't activate the product and move on.

Log ASF

2022-06-21 21:48:02|ArchiSteamFarm-516|INFO|ASF|InitCore() ArchiSteamFarm V5.2.7.5 (linux-arm/7f9b78e7-241a-4e0f-9246-3567b3ab3d4c | .NET 6.0.6; raspbian.11-arm; Linux 5.15.32-v7+ #1538 SMP Thu Mar 31 19:38:48 BST 2022)
2022-06-21 21:48:03|ArchiSteamFarm-516|INFO|ASF|InitCore() Copyright Β© 2015-2022 JustArchiNET
2022-06-21 21:48:22|ArchiSteamFarm-516|INFO|ASF|InitPlugins() Initializing Plugins...
2022-06-21 21:48:30|ArchiSteamFarm-516|INFO|ASF|InitPlugins() Loading ASFEnhance V1.6.5.579...
2022-06-21 21:48:30|ArchiSteamFarm-516|INFO|ASF|OnLoaded() 
==========================================
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•  
β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•     β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•β• β•šβ•β•β•β•β•β•β•šβ•β•β•β•β•β•β•
ASFEnhance Version 1.6.5.579
Developed by Chr_, email [email protected]
https://afdian.net/@chr233
==========================================
Use Command "ASFEVERSION" / "AV" to check the plugin's latest version
Use Command "ASFEUPDATE" / "AU" to update the plugin
==========================================

2022-06-21 21:48:30|ArchiSteamFarm-516|INFO|ASF|InitPlugins() ASFEnhance has been loaded successfully!
2022-06-21 21:48:30|ArchiSteamFarm-516|INFO|ASF|InitPlugins() Loading ASFFreeGamesPlugin V1.2.3.0...
2022-06-21 21:48:30|ArchiSteamFarm-516|INFO|ASF|InitPlugins() ASFFreeGamesPlugin has been loaded successfully!
2022-06-21 21:48:30|ArchiSteamFarm-516|INFO|ASF|InitPlugins() Loading SteamTokenDumperPlugin V5.2.7.5...
2022-06-21 21:48:30|ArchiSteamFarm-516|INFO|ASF|InitPlugins() SteamTokenDumperPlugin has been loaded successfully!
2022-06-21 21:48:30|ArchiSteamFarm-516|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-06-21 21:48:57|ArchiSteamFarm-516|INFO|ASF|UpdateAndRestart() ASF will automatically check for new versions every 12 hours.
2022-06-21 21:48:57|ArchiSteamFarm-516|INFO|ASF|Update() Checking for new version...
2022-06-21 21:49:02|ArchiSteamFarm-516|INFO|ASF|Update() Local version: 5.2.7.5 | Remote version: 5.2.7.5
2022-06-21 21:49:02|ArchiSteamFarm-516|INFO|ASF|Load() Loading STD global cache...
2022-06-21 21:49:03|ArchiSteamFarm-516|INFO|ASF|Load() Validating STD global cache integrity...
2022-06-21 21:49:03|ArchiSteamFarm-516|INFO|ASF|OnASFInit() SteamTokenDumperPlugin has been initialized successfully, thank you in advance for your help. The first submission will happen in approximately 14 minutes from now.
2022-06-21 21:49:04|ArchiSteamFarm-516|INFO|ASF|Start() Starting IPC server...
2022-06-21 21:49:14|ArchiSteamFarm-516|INFO|Microsoft.Hosting.Lifetime|Now listening on: [serverip]
2022-06-21 21:49:15|ArchiSteamFarm-516|INFO|Microsoft.Hosting.Lifetime|Application started. Press Ctrl+C to shut down.
2022-06-21 21:49:15|ArchiSteamFarm-516|INFO|Microsoft.Hosting.Lifetime|Hosting environment: Production
2022-06-21 21:49:15|ArchiSteamFarm-516|INFO|Microsoft.Hosting.Lifetime|Content root path: /home/pi/Desktop/ArchiSteamFarm
2022-06-21 21:49:15|ArchiSteamFarm-516|INFO|ASF|Start() IPC server ready!
2022-06-21 21:49:21|ArchiSteamFarm-516|INFO|JourneyOver|Start() Starting...
2022-06-21 21:49:21|ArchiSteamFarm-516|INFO|JourneyOver|Connect() Connecting...
2022-06-21 21:49:22|ArchiSteamFarm-516|INFO|JourneyOver|OnConnected() Connected to Steam!
2022-06-21 21:49:22|ArchiSteamFarm-516|INFO|JourneyOver|OnConnected() Logging in...
2022-06-21 21:49:27|ArchiSteamFarm-516|INFO|JourneyOver|OnLoggedOn() Successfully logged on as 76561198037630370/Journey_Over.
2022-06-21 21:49:27|ArchiSteamFarm-516|INFO|JourneyOver|Init() Logging in to ISteamUserAuth...
2022-06-21 21:49:28|ArchiSteamFarm-516|INFO|JourneyOver|Init() Success!
2022-06-21 21:49:39|ArchiSteamFarm-516|INFO|JourneyOver|Refresh() Retrieving a total of 8 app access tokens...
2022-06-21 21:49:39|ArchiSteamFarm-516|INFO|JourneyOver|Refresh() Retrieving 8 app access tokens...
2022-06-21 21:49:47|ArchiSteamFarm-516|INFO|JourneyOver|IsAnythingToFarm() Checking first badge page...
2022-06-21 21:49:50|ArchiSteamFarm-516|INFO|JourneyOver|Refresh() Finished retrieving 8 app access tokens.
2022-06-21 21:49:50|ArchiSteamFarm-516|INFO|JourneyOver|Refresh() Finished retrieving a total of 8 app access tokens.
2022-06-21 21:49:50|ArchiSteamFarm-516|INFO|JourneyOver|Refresh() Retrieving all depots for a total of 8 apps...
2022-06-21 21:49:50|ArchiSteamFarm-516|INFO|JourneyOver|Refresh() Retrieving 8 app infos...
2022-06-21 21:49:51|ArchiSteamFarm-516|INFO|JourneyOver|Refresh() Finished retrieving 8 app infos.
2022-06-21 21:49:52|ArchiSteamFarm-516|INFO|JourneyOver|Refresh() Retrieving 37 depot keys...
2022-06-21 21:49:52|ArchiSteamFarm-516|INFO|JourneyOver|Refresh() Finished retrieving 37 depot keys.
2022-06-21 21:49:53|ArchiSteamFarm-516|INFO|JourneyOver|Refresh() Finished retrieving all depot keys for a total of 8 apps.
2022-06-21 21:49:54|ArchiSteamFarm-516|INFO|JourneyOver|IsAnythingToFarm() Checking other badge pages...
2022-06-21 21:49:56|ArchiSteamFarm-516|INFO|JourneyOver|StartFarming() We don't have anything to farm on this account!
2022-06-21 21:49:56|ArchiSteamFarm-516|INFO|JourneyOver|IsAnythingToFarm() Checking first badge page...
2022-06-21 21:49:58|ArchiSteamFarm-516|INFO|JourneyOver|IsAnythingToFarm() Checking other badge pages...
2022-06-21 21:49:59|ArchiSteamFarm-516|INFO|JourneyOver|StartFarming() We don't have anything to farm on this account!
2022-06-21 21:50:03|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] found 22 free games on reddit
2022-06-21 21:50:04|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: app/1599030 | Status: OK | Items: app/1599030

2022-06-21 21:50:04|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: app/798542 | Status: OK | Items: app/798542

2022-06-21 21:50:05|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: app/1472780 | Status: OK

2022-06-21 21:50:05|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: app/1910780 | Status: OK | Items: app/1910780

2022-06-21 21:50:06|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: app/1887560 | Status: OK | Items: app/1887560

2022-06-21 21:50:07|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: app/818040 | Status: OK

2022-06-21 21:50:07|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: app/708720 | Status: OK | Items: app/708720

2022-06-21 21:50:08|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: app/1755240 | Status: OK | Items: app/1755240

2022-06-21 21:50:08|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: app/1956740 | Status: OK | Items: app/1956740

2022-06-21 21:50:09|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: app/1909340 | Status: OK

2022-06-21 21:50:10|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 21:50:10|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 21:50:11|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 21:50:11|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 21:50:12|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 21:50:12|ArchiSteamFarm-516|WARN|JourneyOver|UrlPostToJsonObject() Request failed after 5 attempts!
2022-06-21 21:50:12|ArchiSteamFarm-516|DEBUG|JourneyOver|UrlPostToJsonObject() Request failing: https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 21:50:12|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: sub/730490 | Status: Fail/Timeout

2022-06-21 22:03:04|ArchiSteamFarm-516|INFO|ASF|SubmitData() There is no new data to submit, everything is up-to-date.
2022-06-21 22:20:03|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] found 22 free games on reddit
2022-06-21 22:20:03|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:20:04|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:20:05|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:20:05|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:20:06|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:20:06|ArchiSteamFarm-516|WARN|JourneyOver|UrlPostToJsonObject() Request failed after 5 attempts!
2022-06-21 22:20:06|ArchiSteamFarm-516|DEBUG|JourneyOver|UrlPostToJsonObject() Request failing: https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:20:06|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: sub/730490 | Status: Fail/Timeout

2022-06-21 22:29:18|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] found 22 free games on reddit
2022-06-21 22:29:18|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:29:19|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:29:20|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:29:20|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:29:21|ArchiSteamFarm-516|DEBUG|JourneyOver|InternalRequest() InternalServerError <- POST https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:29:21|ArchiSteamFarm-516|WARN|JourneyOver|UrlPostToJsonObject() Request failed after 5 attempts!
2022-06-21 22:29:21|ArchiSteamFarm-516|DEBUG|JourneyOver|UrlPostToJsonObject() Request failing: https://store.steampowered.com/checkout/addfreelicense/730490
2022-06-21 22:29:21|ArchiSteamFarm-516|INFO|ASF|CollectGames() [FreeGames] <JourneyOver> ID: sub/730490 | Status: Fail/Timeout

Desktop (please complete the following information):

  • OS: Raspbian GNU/Linux 11 (bullseye)
  • Version: Everything is up to date including ASF

Additional context
Add any other context about the problem here.

Exclude "shovelware" games

Hi,

I love this plugin and it works great! I don't know if it's possible, but maybe it would be nice to add an option to skip shovelware (Exclude games with less than 500 reviews or something like that)

Thanks, and keep up the great work!

NullReferenceException in PluginContext.get_CancellationToken() on dev branch

Describe the bug When I try to use the FreeGamesCommand on my bot, I get a NullReferenceException in PluginContext.get_CancellationToken(). This prevents me from saving the options and executing the command.

To Reproduce Steps to reproduce the behavior:

  1. Clone the dev branch of https://github.com/maxisoft/ASFFreeGames
  2. Build and run the plugin with ASF
  3. Send a command like Freegames set VERBOSE
  4. See error

Expected behavior I expected the command to save the options and execute without any errors.

Here is a copy of the error log:

2023-10-29 18:25:24|dotnet-2326|ERROR|ASF|OnBotCommand() System.NullReferenceException: Object reference not set to an instance of an object.
   at Maxisoft.ASF.PluginContext.get_CancellationToken()
   at ASFFreeGames.Commands.FreeGamesCommand.SaveOptions()
   at ASFFreeGames.Commands.FreeGamesCommand.HandleSetCommand(Bot bot, String[] args)
   at ASFFreeGames.Commands.FreeGamesCommand.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
   at ASFFreeGames.Commands.CommandDispatcher.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
   at Maxisoft.ASF.ASFFreeGamesPlugin.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID)
   at ArchiSteamFarm.Core.Utilities.InParallelT
   at ArchiSteamFarm.Plugins.PluginsCore.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID)

Desktop (please complete the following information):

OS: Windows 10
ASF: 5.4.12.5
Plugin build with 4e97524

System.TypeLoadException: Could not load type 'System.WeakReference`1' from assembly

Describe the bug

ASF has updated to using .NET 7 in their releases (starting as of pre-release 5.4.0.1) and now throws errors upon starting up with ASFFreeGames and eventually causes ASF to shut down with a nonzero error code.

2022-11-17 21:37:10|ArchiSteamFarm-18|INFO|ASF|InitCore() ArchiSteamFarm V5.4.0.1 (linux-x64/03862941-877c-441b-9ab6-a1024b74cf02 | .NET 7.0.0; debian.11-x64; Linux 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022)
2022-11-17 21:37:11|ArchiSteamFarm-18|INFO|ASF|InitCore() Copyright Β© 2015-2022 JustArchiNET
2022-11-17 21:37:11|ArchiSteamFarm-18|WARN|ASF|InitGlobalConfigAndLanguage() config/ASF.json config file will be migrated to the latest syntax...
2022-11-17 21:37:11|ArchiSteamFarm-18|INFO|ASF|InitGlobalConfigAndLanguage() Done!
2022-11-17 21:37:11|ArchiSteamFarm-18|INFO|ASF|InitPlugins() Initializing Plugins...
2022-11-17 21:37:12|ArchiSteamFarm-18|INFO|ASF|InitPlugins() Loading ASFEnhance V1.6.18.1...
2022-11-17 21:37:12|ArchiSteamFarm-18|INFO|ASF|OnLoaded() 
==========================================
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•  
β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•     β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•β• β•šβ•β•β•β•β•β•β•šβ•β•β•β•β•β•β•
ASFEnhance Version 1.6.18.1
Developed by Chr_, email [email protected]
https://afdian.net/@chr233
==========================================
Use Command "ASFEVERSION" / "AV" to check the plugin's latest version
Use Command "ASFEUPDATE" / "AU" to update the plugin
==========================================

2022-11-17 21:37:12|ArchiSteamFarm-18|INFO|ASF|InitPlugins() ASFEnhance has been loaded successfully!
2022-11-17 21:37:12|ArchiSteamFarm-18|INFO|ASF|InitPlugins() Loading ASFFreeGamesPlugin V1.2.8.0...
2022-11-17 21:37:12|ArchiSteamFarm-18|INFO|ASF|InitPlugins() ASFFreeGamesPlugin has been loaded successfully!
2022-11-17 21:37:12|ArchiSteamFarm-18|INFO|ASF|InitPlugins() Loading SteamTokenDumperPlugin V5.4.0.1...
2022-11-17 21:37:12|ArchiSteamFarm-18|INFO|ASF|InitPlugins() SteamTokenDumperPlugin has been loaded successfully!
2022-11-17 21:37:12|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-11-17 21:37:12|ArchiSteamFarm-18|INFO|ASF|UpdateAndRestart() ASF will automatically check for new versions every 1 day.
2022-11-17 21:37:12|ArchiSteamFarm-18|INFO|ASF|Update() Checking for new version...
2022-11-17 21:37:12|ArchiSteamFarm-18|INFO|ASF|Update() Local version: 5.4.0.1 | Remote version: 5.4.0.1
2022-11-17 21:37:22|ArchiSteamFarm-18|INFO|ASF|Load() Loading STD global cache...
2022-11-17 21:37:23|ArchiSteamFarm-18|INFO|ASF|Load() Validating STD global cache integrity...
2022-11-17 21:37:23|ArchiSteamFarm-18|INFO|ASF|OnASFInit() SteamTokenDumperPlugin has been initialized successfully, thank you in advance for your help. The first submission will happen in approximately 24 minutes from now.
2022-11-17 21:37:23|ArchiSteamFarm-18|INFO|ASF|Start() Starting IPC server...
2022-11-17 21:37:24|ArchiSteamFarm-18|INFO|Microsoft.Hosting.Lifetime|Now listening on: http://[::]:1242
2022-11-17 21:37:24|ArchiSteamFarm-18|INFO|Microsoft.Hosting.Lifetime|Application started. Press Ctrl+C to shut down.
2022-11-17 21:37:24|ArchiSteamFarm-18|INFO|Microsoft.Hosting.Lifetime|Hosting environment: Production
2022-11-17 21:37:24|ArchiSteamFarm-18|INFO|Microsoft.Hosting.Lifetime|Content root path: /app
2022-11-17 21:37:24|ArchiSteamFarm-18|INFO|ASF|Start() IPC server ready!
2022-11-17 21:37:24|ArchiSteamFarm-18|INFO|JourneyOver|Start() Starting...
2022-11-17 21:37:24|ArchiSteamFarm-18|INFO|JourneyOver|Connect() Connecting...
2022-11-17 21:37:25|ArchiSteamFarm-18|INFO|JourneyOver|OnConnected() Connected to Steam!
2022-11-17 21:37:25|ArchiSteamFarm-18|INFO|JourneyOver|OnConnected() Logging in...
2022-11-17 21:37:26|ArchiSteamFarm-18|INFO|JourneyOver|OnLoggedOn() Successfully logged on as 76561198037630370/Journey_Over.
2022-11-17 21:37:26|ArchiSteamFarm-18|INFO|JourneyOver|Init() Logging in to ISteamUserAuth...
2022-11-17 21:37:26|ArchiSteamFarm-18|INFO|JourneyOver|Init() Success!
2022-11-17 21:37:26|ArchiSteamFarm-18|ERROR|ASF|OnBotLoggedOn() System.TypeLoadException: Could not load type 'System.WeakReference`1' from assembly 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken={idkifthisshouldberemovedornot}'.
   at Maxisoft.ASF.BotContext..ctor(Bot bot)
   at Maxisoft.ASF.ASFFreeGamesPlugin.RegisterBot(Bot bot)
   at Maxisoft.ASF.ASFFreeGamesPlugin.OnBotLoggedOn(Bot bot)
   at ArchiSteamFarm.Core.Utilities.InParallel(IEnumerable`1 tasks)
   at ArchiSteamFarm.Plugins.PluginsCore.OnBotLoggedOn(Bot bot)
2022-11-17 21:37:27|ArchiSteamFarm-18|DEBUG|JourneyOver|Refresh() There are no apps that require a refresh on this bot instance.
2022-11-17 21:37:28|ArchiSteamFarm-18|INFO|JourneyOver|IsAnythingToFarm() Checking first badge page...
2022-11-17 21:37:29|ArchiSteamFarm-18|INFO|JourneyOver|IsAnythingToFarm() Checking other badge pages...
2022-11-17 21:37:30|ArchiSteamFarm-18|INFO|JourneyOver|StartFarming() We don't have anything to farm on this account!
2022-11-17 21:37:57|ArchiSteamFarm-18|INFO|ASF|CollectGames() [FreeGames] found potentially 25 free games on reddit
2022-11-17 21:37:57|ArchiSteamFarm-18|FATAL|ASF|OnUnhandledException() System.Collections.Generic.KeyNotFoundException: The given key 'JourneyOver' was not present in the dictionary.
   at System.Collections.Concurrent.ConcurrentDictionary`2.ThrowKeyNotFoundException(TKey)
   at System.Collections.Concurrent.ConcurrentDictionary`2.get_Item(TKey)
   at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGames(IEnumerable`1 bots, CollectGameRequestSource requestSource, CancellationToken cancellationToken)
   at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGamesOnClock(Object source)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
2022-11-17 21:37:57|ArchiSteamFarm-18|ERROR|ASF|Exit() Exiting with nonzero error code!
2022-11-17 21:37:57|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.8.0) and place in the plugins folder
  2. Start up ASF pre-release
  3. See first error after short moment
  4. Let it try to collect a game
  5. See Second error and it shut itself down

Expected behavior

Well for it to not throw errors and shut down.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Version ASFFreeGames v1.2.8.0 | ArchiSteamFarm 5.4.0.1

Additional context

Downgrading back to the stable release and things work just fine obviously because the stable version hasn't been updated to use .net 7 yet, but I'm sure it won't be too long till it does.

Can't connect to the reddit

2024-05-23 20:41:40|ArchiSteamFarm-22808|DEBUG|ASF|InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new
2024-05-23 20:41:40|ArchiSteamFarm-22808|WARN|ASF|UrlGetToStream() Запрос окончился Π½Π΅ΡƒΠ΄Π°Ρ‡Π΅ΠΉ послС 1 ΠΏΠΎΠΏΡ‹Ρ‚ΠΎΠΊ!
2024-05-23 20:41:40|ArchiSteamFarm-22808|DEBUG|ASF|UrlGetToStream() Запрос Π½Π΅ удался: https://www.reddit.com/user/ASFinfo.json?sort=new
2024-05-23 20:41:41|ArchiSteamFarm-22808|DEBUG|ASF|InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new
2024-05-23 20:41:41|ArchiSteamFarm-22808|WARN|ASF|UrlGetToStream() Запрос окончился Π½Π΅ΡƒΠ΄Π°Ρ‡Π΅ΠΉ послС 1 ΠΏΠΎΠΏΡ‹Ρ‚ΠΎΠΊ!
2024-05-23 20:41:41|ArchiSteamFarm-22808|DEBUG|ASF|UrlGetToStream() Запрос Π½Π΅ удался: https://www.reddit.com/user/ASFinfo.json?sort=new
2024-05-23 20:41:42|ArchiSteamFarm-22808|DEBUG|ASF|InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new
2024-05-23 20:41:42|ArchiSteamFarm-22808|WARN|ASF|UrlGetToStream() Запрос окончился Π½Π΅ΡƒΠ΄Π°Ρ‡Π΅ΠΉ послС 1 ΠΏΠΎΠΏΡ‹Ρ‚ΠΎΠΊ!
2024-05-23 20:41:42|ArchiSteamFarm-22808|DEBUG|ASF|UrlGetToStream() Запрос Π½Π΅ удался: https://www.reddit.com/user/ASFinfo.json?sort=new
2024-05-23 20:41:44|ArchiSteamFarm-22808|DEBUG|ASF|InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new
2024-05-23 20:41:44|ArchiSteamFarm-22808|WARN|ASF|UrlGetToStream() Запрос окончился Π½Π΅ΡƒΠ΄Π°Ρ‡Π΅ΠΉ послС 1 ΠΏΠΎΠΏΡ‹Ρ‚ΠΎΠΊ!
2024-05-23 20:41:44|ArchiSteamFarm-22808|DEBUG|ASF|UrlGetToStream() Запрос Π½Π΅ удался: https://www.reddit.com/user/ASFinfo.json?sort=new
2024-05-23 20:41:47|ArchiSteamFarm-22808|DEBUG|ASF|InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new
2024-05-23 20:41:47|ArchiSteamFarm-22808|WARN|ASF|UrlGetToStream() Запрос окончился Π½Π΅ΡƒΠ΄Π°Ρ‡Π΅ΠΉ послС 1 ΠΏΠΎΠΏΡ‹Ρ‚ΠΎΠΊ!
2024-05-23 20:41:47|ArchiSteamFarm-22808|DEBUG|ASF|UrlGetToStream() Запрос Π½Π΅ удался: https://www.reddit.com/user/ASFinfo.json?sort=new
2024-05-23 20:41:47|ArchiSteamFarm-22808|ERROR|ASF|CollectGames() Unable to load json from reddit RedditServerException: content is null

ASF:

ASF: v6.0.2.6
Plugin: v1.5.3

Integration with steamDB

I was wondering (after the various blackout in the reddit world) if could be possible to integrate the possibility to search free games directly from the steamDB free games section, like this one: https://steamdb.info/freepackages/#

I don't know if it's a viable way, it's just an idea (and I don't know if there is a better place to share it).

Thanks!

ASF issues an error on the latest version

2023-12-16 14:46:17|ArchiSteamFarm-18|ERROR|ASF|OnBotLoggedOn() System.MissingMethodException: Method not found: 'UInt32 System.BitConverter.ToUInt32(System.ReadOnlySpan`1<Byte>)'.
   at Maxisoft.ASF.RandomUtils.GaussianRandom.NextDouble()
   at Maxisoft.ASF.RandomUtils.GaussianRandom.NextGaussian(Double mean, Double standardDeviation)
   at Maxisoft.ASF.CollectIntervalManager.GetRandomizedTimerDelay(Double meanSeconds, Double stdSeconds, Double minSeconds, Double maxSeconds)
   at Maxisoft.ASF.CollectIntervalManager.StartTimerIfNeeded()
   at Maxisoft.ASF.ASFFreeGamesPlugin.StartTimerIfNeeded()
   at Maxisoft.ASF.ASFFreeGamesPlugin.RegisterBot(Bot bot)
   at Maxisoft.ASF.ASFFreeGamesPlugin.OnBotLoggedOn(Bot bot)
   at ArchiSteamFarm.Core.Utilities.InParallel(IEnumerable`1 tasks)
   at ArchiSteamFarm.Plugins.PluginsCore.OnBotLoggedOn(Bot bot)

ASF version: 5.5.0.10 (Docker)
ASFFreeGames version: 1.4.1 (Pre-release)

This error is not critical, since after this error (the error occurs for each running bot, not once) ASF continues to work, but the plugin itself does not work.

ASFFreeGames V1.3.0.0 crashes ASF when looking for free games.

The fatal errors I get with V1.3.0.0, causing ASF to immediately shutdown.

Here are the errors I get when ArchiSteamFarm is first loaded using ASFreeGames.

asffarmerror00

This is the error it gives just before ArchiSteamFarm immediately closes itself.

asffarmerror01

I have two bots loaded.. this worked until about a week ago, the program now closes just as soon as it searches for free games. I'm on Windows 11, using ASF V5.5.0.11, and ASFFreeGames V1.3.0.0.

System.MissingMethodException: Attempted to access a missing method.

Bug description
Errors when logging into accounts

To Reproduce
Steps to reproduce the behavior:
1.Installing plugin version 1.4.1
2.Running ASF and getting an error when logging into bot accounts (as shown on the screenshot)

Screenshots
ArchiSteamFarm_i7coVylSWl

Desktop :
OS: Windows 10
Browser chrome
Version 1.4.1

Crashing on load

Crashing on load
After loading with the current build of the plugin installed on the latest ASF it crashes

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'ASF Install Location'
  2. Add Plugin.
  3. Run ASF
  4. See error

Expected behavior
The plugin should work

What actually happens
Crash log

2022-04-02 16:00:10|ArchiSteamFarm-15876|FATAL|ASF|OnUnhandledException() System.InvalidOperationException: Failed to compare two elements in the array.
 ---> System.MissingMethodException: Attempted to access a missing method.
   at Maxisoft.ASF.BotContext.get_RunElapsed()
   at Maxisoft.ASF.ASFFreeGamesPlugin.<CollectGamesOnClock>g__orderByRunKeySelector|21_0(Bot bot)
   at Maxisoft.ASF.ASFFreeGamesPlugin.<CollectGamesOnClock>g__comparison|21_1(Bot x, Bot y)
   at System.Collections.Generic.ArraySortHelper`1.InsertionSort(Span`1 , Comparison`1 )
   at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 , Int32 , Comparison`1 )
   at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 , Comparison`1 )
   --- End of inner exception stack trace ---
   at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 , Comparison`1 )
   at System.Array.Sort[T](T[] array, Comparison`1 comparison)
   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()

Desktop:

  • OS: Windows 11
  • Browser Chrome
  • Version 100.0.4896.60

Additional context
Only other plugin installed is CaseInsesitive

Remember the activation status of games so as not to try to activate them next time

Is your feature request related to a problem? Please describe.
I would really like to see functionality that would write AccessDenied/InvalidPackage and Fail/AlreadyPurchased errors to the file, since the plugin constantly checks for new free games and tries to add to the account those games whose activation gave an error. Because of this, logs are overflowing with the same type of messages:

2022-10-22 03:07:17|dotnet-19|INFO|ASF|CollectGames() [FreeGames] <*account name*> ID: app/489520 | Status: Fail/AlreadyPurchased
2022-10-22 03:37:20|dotnet-19|INFO|ASF|CollectGames() [FreeGames] <*account name*> ID: app/489520 | Status: Fail/AlreadyPurchased
2022-10-22 04:07:17|dotnet-19|INFO|ASF|CollectGames() [FreeGames] <*account name*> ID: app/489520 | Status: Fail/AlreadyPurchased
2022-10-22 04:37:25|dotnet-19|INFO|ASF|CollectGames() [FreeGames] <*account name*> ID: app/489520 | Status: Fail/AlreadyPurchased
2022-10-22 05:37:40|dotnet-19|INFO|ASF|CollectGames() [FreeGames] <*account name*> ID: app/489520 | Status: Fail/AlreadyPurchased

Describe the solution you'd like
For example, if activation would have given an error, write to the file those AppIDs that would not have been activated in the next day/week, so as not to give this error every time.

Additional context
I do not know if the functionality of plugins allows you to create files and write such information to them (I'm talking about what was proposed in Describe the solution you'd like), but if it is possible, it would be very good to have it implemented. Thanks.

Incompatibility of plugin version 1.4.1 with version 5.5.1.4

Describe the bug
image

To Reproduce
install plugin version 1.4.1 on asf 5.5.1.4

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

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Update project to use net7.0

Once ASF 5.4.X.X get released as stable this plugin should use the same sdk version.

Subtasks:

  • Update cspoj files
  • Update CI

Unable to load previous completed app dict - Exiting with nonzero error code

Describe the bug
While ASF tries to load the plugin it gets a "unable to load previous completed app dict" error and exits with nonzero error code.
Without the plugin ASF works fine and there are no errors.

To Reproduce
It's probably hard to reproduce, since I don't understand the cause and can't explain how to. Sorry.
I use your plugin for months now without issues and changed nothing on system except for regular updates.

Log ASF

2022-06-09 13:32:56|ArchiSteamFarm-12082|INFO|ASF|InitCore() Copyright Β© 2015-2022 JustArchiNET
2022-06-09 13:32:56|ArchiSteamFarm-12082|INFO|ASF|InitPlugins() Initializing Plugins...
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|InitPlugins() Loading ASFEnhance V1.6.4.469...
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|OnLoaded() 
==========================================
 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•  
β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•     β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•β• β•šβ•β•β•β•β•β•β•šβ•β•β•β•β•β•β•
ASFEnhance Version 1.6.4.469
Developed by Chr_, email [email protected]
https://afdian.net/@chr233
==========================================
Use Command "ASFEVERSION" / "AV" to check the plugin's latest version
Use Command "ASFEUPDATE" / "AU" to update the plugin
==========================================

2022-06-09 13:32:55|ArchiSteamFarm-12082|INFO|ASF|InitPlugins() ASFEnhance has been loaded successfully!
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|InitPlugins() Loading SteamTokenDumperPlugin V5.2.7.1...
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|InitPlugins() SteamTokenDumperPlugin has been loaded successfully!
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|InitPlugins() Loading CaseInsensitiveASF V0.4.1.0...
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|OnLoaded() Case Insensitive ASF Plugin by Ryzhehvost, powered by ginger cats
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|InitPlugins() CaseInsensitiveASF has been loaded successfully!
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|InitPlugins() Loading ASFFreeGamesPlugin V1.2.1.0...
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|InitPlugins() ASFFreeGamesPlugin has been loaded successfully!
2022-06-09 13:32:57|ArchiSteamFarm-12082|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-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|UpdateAndRestart() ASF will automatically check for new versions every 12 hours.
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|Update() Checking for new version...
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|Update() Local version: 5.2.7.1 | Remote version: 5.2.7.1
2022-06-09 13:32:57|ArchiSteamFarm-12082|INFO|ASF|OnASFInit() SteamTokenDumperPlugin is currently disabled according to your configuration. If you'd like to help SteamDB in data submission, please check out our wiki.
2022-06-09 13:32:57|ArchiSteamFarm-12082|WARN|ASF|RegisterBots() You're running more personal bot accounts than our upper recommended limit (10). Be advised that this setup is not supported and might cause various Steam-related issues, including account suspensions. Check out the FAQ for more details.
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot1|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot1|Connect() Connecting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot10|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot2|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot5|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot2|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot7|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot9|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot15|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot12|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot11|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot13|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot3|Start() Starting...
2022-06-09 13:33:08|ArchiSteamFarm-12082|INFO|bot6|Start() Starting...
2022-06-09 13:33:09|ArchiSteamFarm-12082|INFO|bot8|Start() Starting...
2022-06-09 13:33:09|ArchiSteamFarm-12082|INFO|bot14|Start() Starting...
2022-06-09 13:33:09|ArchiSteamFarm-12082|INFO|bot1|OnConnected() Connected to Steam!
2022-06-09 13:33:09|ArchiSteamFarm-12082|INFO|bot1|OnConnected() Logging in...
2022-06-09 13:33:09|ArchiSteamFarm-12082|INFO|bot1|OnLoggedOn() Successfully logged on as *****************/bot1.
2022-06-09 13:33:10|ArchiSteamFarm-12082|INFO|bot1|Init() Logging in to ISteamUserAuth...
2022-06-09 13:33:10|ArchiSteamFarm-12082|INFO|bot1|Init() Success!
!2022-06-09 13:33:10|ArchiSteamFarm-12082|ERROR|ASF|LoadFromFile() Unable to load previous completed app dict
2022-06-09 13:33:11|ArchiSteamFarm-12082|INFO|bot1|IsAnythingToFarm() Checking first badge page...
2022-06-09 13:33:11|ArchiSteamFarm-12082|INFO|bot1|StartFarming() We don't have anything to farm on this account!
2022-06-09 13:33:18|ArchiSteamFarm-12082|INFO|bot10|Connect() Connecting...
2022-06-09 13:33:18|ArchiSteamFarm-12082|INFO|bot10|OnConnected() Connected to Steam!
2022-06-09 13:33:18|ArchiSteamFarm-12082|INFO|bot10|OnConnected() Logging in...
2022-06-09 13:33:19|ArchiSteamFarm-12082|INFO|bot10|OnLoggedOn() Successfully logged on as *****************/smurfgeneratorcom.
2022-06-09 13:33:19|ArchiSteamFarm-12082|INFO|bot10|Init() Logging in to ISteamUserAuth...
2022-06-09 13:33:19|ArchiSteamFarm-12082|INFO|bot10|IsAnythingToFarm() Checking first badge page...
2022-06-09 13:33:19|ArchiSteamFarm-12082|INFO|bot10|Init() Success!
! 2022-06-09 13:33:19|ArchiSteamFarm-12082|ERROR|ASF|LoadFromFile() Unable to load previous completed app dict
2022-06-09 13:33:20|ArchiSteamFarm-12082|INFO|bot10|StartFarming() We don't have anything to farm on this account!
2022-06-09 13:33:28|ArchiSteamFarm-12082|INFO|bot2|Connect() Connecting...
2022-06-09 13:33:28|ArchiSteamFarm-12082|INFO|bot2|OnConnected() Connected to Steam!
2022-06-09 13:33:28|ArchiSteamFarm-12082|INFO|bot2|OnConnected() Logging in...
2022-06-09 13:33:29|ArchiSteamFarm-12082|INFO|bot2|OnLoggedOn() Successfully logged on as *****************/bot2.
2022-06-09 13:33:29|ArchiSteamFarm-12082|INFO|bot2|Init() Logging in to ISteamUserAuth...
2022-06-09 13:33:29|ArchiSteamFarm-12082|INFO|bot2|IsAnythingToFarm() Checking first badge page...
2022-06-09 13:33:30|ArchiSteamFarm-12082|INFO|bot2|Init() Success!
!2022-06-09 13:33:30|ArchiSteamFarm-12082|ERROR|ASF|LoadFromFile() Unable to load previous completed app dict
2022-06-09 13:33:31|ArchiSteamFarm-12082|INFO|bot2|IsAnythingToFarm() Checking other badge pages...
2022-06-09 13:33:33|ArchiSteamFarm-12082|INFO|bot2|Farm() We have a total of 6 games (21 cards) left to farm (~10 hours, 30 minutes remaining)...
2022-06-09 13:33:33|ArchiSteamFarm-12082|INFO|bot2|Farm() Chosen farming algorithm: Simple
2022-06-09 13:33:33|ArchiSteamFarm-12082|INFO|bot2|IsPlayableGame() Farming 960990 (Beyond: Two Souls) is temporarily disabled, as ASF is not able to play that game at the moment.
2022-06-09 13:33:33|ArchiSteamFarm-12082|INFO|bot2|IsPlayableGame() Farming 1283190 (Neighbours back From Hell) is temporarily disabled, as ASF is not able to play that game at the moment.
2022-06-09 13:33:33|ArchiSteamFarm-12082|INFO|bot2|IsPlayableGame() Farming 537800 (Bomber Crew) is temporarily disabled, as ASF is not able to play that game at the moment.
2022-06-09 13:33:33|ArchiSteamFarm-12082|INFO|bot2|IsPlayableGame() Farming 527230 (For The King) is temporarily disabled, as ASF is not able to play that game at the moment.
2022-06-09 13:33:33|ArchiSteamFarm-12082|INFO|bot2|IsPlayableGame() Farming 555510 (MachiaVillain) is temporarily disabled, as ASF is not able to play that game at the moment.
2022-06-09 13:33:33|ArchiSteamFarm-12082|INFO|bot2|IsPlayableGame() Farming 675010 (MudRunner) is temporarily disabled, as ASF is not able to play that game at the moment.
2022-06-09 13:33:33|ArchiSteamFarm-12082|INFO|bot2|IsAnythingToFarm() Checking first badge page...
2022-06-09 13:33:34|ArchiSteamFarm-12082|INFO|bot2|IsAnythingToFarm() Checking other badge pages...
2022-06-09 13:33:35|ArchiSteamFarm-12082|INFO|bot2|Farm() Farming finished!
2022-06-09 13:33:38|ArchiSteamFarm-12082|INFO|bot5|Connect() Connecting...
2022-06-09 13:33:38|ArchiSteamFarm-12082|INFO|bot5|OnConnected() Connected to Steam!
2022-06-09 13:33:38|ArchiSteamFarm-12082|INFO|bot5|OnConnected() Logging in...
2022-06-09 13:33:39|ArchiSteamFarm-12082|INFO|bot5|OnLoggedOn() Successfully logged on as *****************/bot5.
2022-06-09 13:33:39|ArchiSteamFarm-12082|WARN|bot5|OnLoggedOn() This account is limited, farming process is unavailable until the restriction is removed!
2022-06-09 13:33:39|ArchiSteamFarm-12082|INFO|bot5|Init() Logging in to ISteamUserAuth...
2022-06-09 13:33:39|ArchiSteamFarm-12082|INFO|bot5|StartFarming() We don't have anything to farm on this account!
2022-06-09 13:33:39|ArchiSteamFarm-12082|INFO|bot5|Init() Success!
!2022-06-09 13:33:39|ArchiSteamFarm-12082|ERROR|ASF|LoadFromFile() Unable to load previous completed app dict
-2022-06-09 13:33:40|ArchiSteamFarm-12082|FATAL|ASF|OnUnhandledException() System.MissingMethodException: Method not found: 'UInt32 ArchiSteamFarm.Core.Utilities.GetUnixTime()'.
-   at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGames(IEnumerable`1 bots, CancellationToken cancellationToken)
-   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& )
-   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-06-09 13:33:40|ArchiSteamFarm-12082|ERROR|ASF|Exit() Exiting with nonzero error code!
2022-06-09 13:33:40|ArchiSteamFarm-12082|INFO|bot8|Stop() Stopping...
2022-06-09 13:33:40|ArchiSteamFarm-12082|INFO|bot1|Stop() Stopping...
2022-06-09 13:33:40|ArchiSteamFarm-12082|INFO|bot9|Stop() Stopping...
2022-06-09 13:33:40|ArchiSteamFarm-12082|INFO|bot7|Stop() Stopping...
2022-06-09 13:33:40|ArchiSteamFarm-12082|INFO|bot6|Stop() Stopping...
2022-06-09 13:33:40|ArchiSteamFarm-12082|INFO|bot2|Stop() Stopping...
2022-06-09 13:33:40|ArchiSteamFarm-12082|INFO|bot4|Stop() Stopping...
2022-06-09 13:33:40|ArchiSteamFarm-12082|INFO|bot3|Stop() Stopping...
2022-06-09 13:33:40|ArchiSteamFarm-12082|INFO|bot5|Stop() Stopping...

Expected behavior
ASF loads the plugin without errors, like it worked before for months.

Server (please complete the following information):

  • OS: Debian Bullseye
  • Version: Everything UP2D including ASF (V5.2.7.1)

Additional context
Other installed plugins: ASFEnhance, Case-Insensitive-ASF

Crash if reddit request fails

Describe the bug
If the reddit request failes, ASF crashes. In my scenario, this is probably caused by the ip pool of the server or a rate limit.

To Reproduce
Steps to reproduce the behavior:

  1. Get blocked by reddit (HTTP 403 Blocked/Forbidden)
  2. Run the plugin

Expected behavior
Error should be handled and dont crash.

Screenshots

[22:53:29] INFO Zulu > Init() Success!
[22:53:29] INFO Zulu > IsAnythingToFarm() Checking first badge page...
[22:53:30] INFO Zulu > StartFarming() We don't have anything to farm on this account!
[22:53:41] DEBUG ASF > InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new
[22:53:41] WARN ASF > UrlGetToStream() Request failed after 5 attempts!
[22:53:41] DEBUG ASF > UrlGetToStream() Request failing: https://www.reddit.com/user/ASFinfo.json?sort=new
[22:53:41] DEBUG ASF > InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new
[22:53:41] WARN ASF > UrlGetToStream() Request failed after 5 attempts!
[22:53:41] DEBUG ASF > UrlGetToStream() Request failing: https://www.reddit.com/user/ASFinfo.json?sort=new
[22:53:41] DEBUG ASF > InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new
[22:53:41] WARN ASF > UrlGetToStream() Request failed after 5 attempts!
[22:53:41] DEBUG ASF > UrlGetToStream() Request failing: https://www.reddit.com/user/ASFinfo.json?sort=new
[22:53:42] DEBUG ASF > InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new
[22:53:42] WARN ASF > UrlGetToStream() Request failed after 5 attempts!
[22:53:42] DEBUG ASF > UrlGetToStream() Request failing: https://www.reddit.com/user/ASFinfo.json?sort=new
[22:53:44] DEBUG ASF > InternalRequest() Forbidden <- GET https://www.reddit.com/user/ASFinfo.json?sort=new
[22:53:44] WARN ASF > UrlGetToStream() Request failed after 5 attempts!
[22:53:44] DEBUG ASF > UrlGetToStream() Request failing: https://www.reddit.com/user/ASFinfo.json?sort=new
[22:53:44] FATAL ASF > OnUnhandledException() Maxisoft.ASF.Reddit.RedditServerException: Reddit server error: content is null at Maxisoft.ASF.Reddit.RedditHelper.GetPayload(WebBrowser webBrowser, CancellationToken cancellationToken, UInt32 retry) at Maxisoft.ASF.Reddit.RedditHelper.GetPayload(WebBrowser webBrowser, CancellationToken cancellationToken, UInt32 retry) at Maxisoft.ASF.Reddit.RedditHelper.GetGames(CancellationToken cancellationToken) at ASFFreeGames.Commands.FreeGamesCommand.CollectGames(IEnumerable`1 bots, ECollectGameRequestSource requestSource, CancellationToken cancellationToken) at ASFFreeGames.Commands.FreeGamesCommand.HandleInternalCollectCommand(Bot bot, String[] args, CancellationToken cancellationToken) at ASFFreeGames.Commands.FreeGamesCommand.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken) at ASFFreeGames.Commands.CommandDispatcher.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken) at Maxisoft.ASF.ASFFreeGamesPlugin.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID) at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGamesOnClock(Object source) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state) at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi) at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext, Action`1, TState& ) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() at System.Threading.Thread.StartCallback()
[22:53:44] ERROR ASF > Exit() Exiting with 1 error code!
[22:53:44] INFO Microsoft.Hosting.Lifetime > Application is shutting down...

ASF:

  • ASF: v6.0.2.6
  • Plugin: v1.5.2

System.Collections.Generic.KeyNotFoundException: The given key

2024-05-09 14:43:18|ArchiSteamFarm-23364|INFO|ASF|CollectGames() [FreeGames] found potentially 22 free games on reddit 2024-05-09 14:43:18|ArchiSteamFarm-23364|FATAL|ASF|OnUnhandledException() System.Collections.Generic.KeyNotFoundException: The given key 'Terreus' was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey)
at ASFFreeGames.Commands.FreeGamesCommand.<>c__DisplayClass14_0.b__2(String botName)
at System.Linq.Enumerable.SelectListPartitionIterator2.MoveNext() at ASFFreeGames.Commands.FreeGamesCommand.CollectGames(IEnumerable1 bots, ECollectGameRequestSource requestSource, CancellationToken cancellationToken)
at ASFFreeGames.Commands.FreeGamesCommand.HandleInternalCollectCommand(Bot bot, String[] args, CancellationToken cancellationToken)
at ASFFreeGames.Commands.FreeGamesCommand.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
at ASFFreeGames.Commands.CommandDispatcher.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
at Maxisoft.ASF.ASFFreeGamesPlugin.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID)
at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGamesOnClock(Object source)
at System.Threading.Tasks.Task.<>c.b__128_1(Object state)
at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext, Action1, TState& ) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() at System.Threading.Thread.StartCallback() 2024-05-09 14:43:18|ArchiSteamFarm-23364|ERROR|ASF|Exit() Exiting with 1 error code! 2024-05-09 14:43:18|ArchiSteamFarm-23364|INFO|Microsoft.Hosting.Lifetime|Application is shutting down... Unhandled exception. System.Collections.Generic.KeyNotFoundException: The given key 'Terreus' was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey)
at ASFFreeGames.Commands.FreeGamesCommand.<>c__DisplayClass14_0.b__2(String botName)
at System.Linq.Enumerable.SelectListPartitionIterator2.MoveNext() at ASFFreeGames.Commands.FreeGamesCommand.CollectGames(IEnumerable1 bots, ECollectGameRequestSource requestSource, CancellationToken cancellationToken)
at ASFFreeGames.Commands.FreeGamesCommand.HandleInternalCollectCommand(Bot bot, String[] args, CancellationToken cancellationToken)
at ASFFreeGames.Commands.FreeGamesCommand.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
at ASFFreeGames.Commands.CommandDispatcher.Execute(Bot bot, String message, String[] args, UInt64 steamID, CancellationToken cancellationToken)
at Maxisoft.ASF.ASFFreeGamesPlugin.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID)
at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGamesOnClock(Object source)
at System.Threading.Tasks.Task.<>c.b__128_1(Object state)
at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext, Action1, TState& ) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() at System.Threading.Thread.StartCallback() zsh: abort /Users/********/*******/ASF-osx-x64/ArchiSteamFarm

Desktop:

  • OS: mcOS Sonoma

Error when retrieving game list JSON data from reddit

The plugin gets an error ❌ sometime when trying to parse the JSON response from ASFInfo. It seems like the response is not a valid JSON format πŸ˜•, but rather an HTML page πŸ“ƒ.

Here is the stacktrace of the error:

[21:40:18] DEBUG ASF > UrlGetToJsonObject() Request failing: https://www.reddit.com/user/ASFinfo.json?sort=new
[21:40:19] WARN ASF > UrlGetToJsonObject() Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 2, position 4.
> at Newtonsoft.Json.JsonTextReader.ParseValue()
> at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
> at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
> at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
> at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
> at ArchiSteamFarm.Web.WebBrowser.UrlGetToJsonObject[T](Uri request, IReadOnlyCollection`1 headers, Uri referer, ERequestOptions requestOptions, Byte maxTries, Int32 rateLimitingDelay)
> at ArchiSteamFarm.Web.WebBrowser.UrlGetToJsonObject[T](Uri request, IReadOnlyCollection`1 headers, Uri referer, ERequestOptions requestOptions, Byte maxTries, Int32 rateLimitingDelay)
[21:40:19] DEBUG ASF > UrlGetToJsonObject() Request failing: https://www.reddit.com/user/ASFinfo.json?sort=new
[21:40:19] WARN ASF > UrlGetToJsonObject() Request failed after 5 attempts!
[21:40:19]  DEBUG ASF > UrlGetToJsonObject() Request failing: https://www.reddit.com/user/ASFinfo.json?sort=new

Here are some previous comments related to this issue πŸ‘‡

The good news πŸŽ‰ is that this error seems temporary and doesn't affect the plugin's main functionality in the long term.
The bad news 😒 is that it's hard to reproduce it reliably.

It's still unclear ❓ if this is a bug on reddit's side or on the plugin's side.

Games don't add up

I did everything right, I entered the command freegames, the program replied that it received 6 free games but they were not added to steam, unless it's not supposed to be added to stea, can someone help me??

Fix integration tests that fail due to outdated steam credentials

The integration tests for this project are not running anymore because the steam credentials used for testing are outdated. This causes the tests to fail with an authentication error. This is a serious issue because it prevents the detection of potential bugs or regressions in the code, such as the one reported in #43.

To fix this issue, I suggest the following steps:

  • Update the steam credentials used for testing with valid ones that have access to the free games.
  • Make sure the credentials are stored securely and not exposed to the public or unauthorized users.
  • Run the integration tests regularly and monitor the results for any failures or errors.
  • Fix any issues that are found by the integration tests as soon as possible.

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

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 [email protected]
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):

  • OS: Ubuntu 22.04
  • Version ASFFreeGames v1.2.5.0 | ArchiSteamFarm 5.3.2.2

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

Incompatibility of plugin version 1.4.0 with ASF 5.4.12.5

Error Description
Problem with launching the latest version of the plugin

To Reproduce
Steps to reproduce the behavior:
1.Installing plugin version 1.4.0
2.Running ASF and getting an error that indicates that all other plugins are not working(of course, when you remove the plugin all starts to work fine).

Expected behavior
Running the programme with all plug-ins

Screenshots
ArchiSteamFarm_RLpx8lfgPN

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser chrome
  • Version 1.4.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.