GithubHelp home page GithubHelp logo

rudokhvist / boostercreator Goto Github PK

View Code? Open in Web Editor NEW
37.0 3.0 2.0 75 KB

ASF plugin to create booster packs from gems (forked)

C# 50.96% Batchfile 3.89% CSS 45.15%
asf archisteamfarm plugin asf-plugin

boostercreator's People

Contributors

abrynos avatar citrinate avatar outzzz avatar rudokhvist avatar woctezuma avatar

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

Watchers

 avatar  avatar  avatar

boostercreator's Issues

System.MissingMethodException: Method not found

ArchiSteamFarm V5.2.5.5 (generic/ff9c19de-593f-4213-b31d-4e09469e6931 | .NET 6.0.4; win10-x64)
ERROR|ASF|OnBotInitModules() System.MissingMethodException: Method not found: 'Void ArchiSteamFarm.NLog.ArchiLogger.LogNullError(System.String, System.String)'.
   at BoosterCreator.BoosterCreator.OnBotInitModules(Bot bot, IReadOnlyDictionary`2 additionalConfigProperties)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at BoosterCreator.BoosterCreator.OnBotInitModules(Bot bot, IReadOnlyDictionary`2 additionalConfigProperties)
   at ArchiSteamFarm.Plugins.PluginsCore.<>c__DisplayClass21_0.<OnBotInitModules>b__0(IBotModules plugin)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Threading.Tasks.Task.WhenAll(IEnumerable`1 tasks)
   at ArchiSteamFarm.Core.Utilities.InParallel(IEnumerable`1 tasks)
   at ArchiSteamFarm.Plugins.PluginsCore.OnBotInitModules(Bot bot, IReadOnlyDictionary`2 additionalConfigProperties)

Breaking ArchiSteamFarm

Using ASF 5.5.1.4 on win 64, have this error:

image

and then, it quits the ASF.

How to fix it, or a new version is needed?

FYI: this was also happening on older ASF versions

System.MissingMethodException issue on v1.1.0.0 with ASF v5.0.1.2

Hello,

I recently try this plugin and find it doesn't work,
I followed the example ASF bot config : "GamesToBooster": [nnnnnn, nnnnnn],
and the below is the log message of the error

The setup of my ASF is ASF-generic.zip v5.0.1.2 on a CentOS 7 (Google Computer Engine Image)


2021-01-05 11:01:28|ArchiSteamFarm-4847|FATAL|ASF|OnUnhandledException() System.MissingMethodException: Method not found: 'System.String System.DateTime.ToShortDateString()'.
at BoosterCreator.BoosterHandler..ctor(Bot bot, IReadOnlyCollection'1 gameIDs)
at BoosterCreator.BoosterCreator.<>c__DisplayClass6_1.b__0()
at System.Threading.Tasks.Task'1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at BoosterCreator.BoosterCreator.OnBotInitModules(Bot bot, IReadOnlyDictionary'2 additionalConfigProperties)
at System.Threading.Tasks.Task.<>c.b__140_1(Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
2021-01-05 11:01:28|ArchiSteamFarm-4847|ERROR|ASF|Exit() Exiting with nonzero error code!
Unhandled exception. System.MissingMethodException: Method not found: 'System.String System.DateTime.ToShortDateString()'.
at BoosterCreator.BoosterHandler..ctor(Bot bot, IReadOnlyCollection'1 gameIDs)
at BoosterCreator.BoosterCreator.<>c__DisplayClass6_1.b__0()
at System.Threading.Tasks.Task'1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at BoosterCreator.BoosterCreator.OnBotInitModules(Bot bot, IReadOnlyDictionary'2 additionalConfigProperties)
at System.Threading.Tasks.Task.<>c.b__140_1(Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Aborted

Issue with ASF v.5

ASF was updated to version 5. Since then, the plugin has stopped working, especially to trigger creation of packs on bots.

Can't seem to get this plugin working.

When installing this plugin and running the "booster" command, I just get an error, which you can see below. I am using the latest version of ASF. Any solutions for this would be greatly appreciated.

2023-03-31 18:56:20|ArchiSteamFarm-18|ERROR|ASF|OnBotCommand() System.MissingMethodException: Method not found: '!!0 System.Linq.Enumerable.Min(System.Collections.Generic.IEnumerable`1<!!0>)'.

   at BoosterCreator.BoosterHandler.CreateBooster(Bot bot, ConcurrentDictionary`2 gameIDs)

   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine&)

   at BoosterCreator.BoosterHandler.CreateBooster(Bot bot, ConcurrentDictionary`2 gameIDs)

   at BoosterCreator.Commands.ResponseBooster(Bot bot, EAccess access, String targetGameIDs)

   at BoosterCreator.Commands.Response(Bot bot, EAccess access, UInt64 steamID, String message, String[] args)

   at BoosterCreator.BoosterCreator.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID)

   at ArchiSteamFarm.Core.Utilities.InParallel[T](IEnumerable`1 tasks)

   at ArchiSteamFarm.Plugins.PluginsCore.OnBotCommand(Bot bot, EAccess access, String message, String[] args, UInt64 steamID)

Could not load file or assembly AngleSharp

ArchiSteamFarm V5.2.8.4 (generic/7bbe0d91-9e01-49d7-9653-9f1f07adb09a | .NET 6.0.7; win10-x64)
ERROR|ASF|InitPlugins() Échec dû à une erreur : BoosterCreator, Version=1.2.3.1, Culture=neutral, PublicKeyToken=null
ERROR|ASF|InitPlugins() System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'AngleSharp, Version=0.17.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea'. Le fichier spécifié est introuvable.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at ArchiSteamFarm.Plugins.PluginsCore.InitPlugins()
System.IO.FileNotFoundException: Could not load file or assembly 'AngleSharp, Version=0.17.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea'. Le fichier spécifié est introuvable.
File name: 'AngleSharp, Version=0.17.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea'

System.Threading.Timer

I'm new using ASF plugins. I couldn't find a fix for this

2020-02-01 14:00:38|ArchiSteamFarm-8764|FATAL|ASF|OnUnhandledException() System.IO.FileNotFoundException: Could not load file or assembly 'System.Threading.Timer, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. El sistema no puede encontrar el archivo especificado.
File name: 'System.Threading.Timer, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at BoosterCreator.BoosterHandler..ctor(Bot bot, IReadOnlyCollection`1 gameIDs)
   at BoosterCreator.BoosterCreator.<>c__DisplayClass6_1.<OnBotInitModules>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
   at BoosterCreator.BoosterCreator.OnBotInitModules(Bot bot, IReadOnlyDictionary`2 additionalConfigProperties)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Thanks in advance for any help! :)

Suggestion regarding scheduler

Hi,
Thanks for this great and useful tool!

I've a small suggestion regarding its scheduler:
during initial setup Plugin is adding 5 min delay between bots and this is fine!
but after successful creation or when booster unavailable and Plugin is scheduling next try it's again adding 5 min (GetBotIndex(bot) * DelayBetweenBots) delay per bot. I think this is unnecessary waste of time, and you can remove it.

Thanks in advance!

I think that the new asc version broke it

You are probably aware of this, but just in case, the plugin loads normally with the new version but when the 5 minutes pass and it attempts to create boosters, it shuts asc down. This is my log:

2023-12-15 19:33:53|dotnet-12020|FATAL|ASF|OnUnhandledException() System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task1<ArchiSteamFarm.Web.Responses.HtmlDocumentResponse> ArchiSteamFarm.Steam.Integration.ArchiWebHandler.UrlGetToHtmlDocumentWithSession(System.Uri, System.Collections.Generic.IReadOnlyCollection1<System.Collections.Generic.KeyValuePair2<System.String,System.String>>, System.Uri, ERequestOptions, Boolean, Byte, Int32, Boolean)'. at BoosterCreator.WebRequest.GetBoosterPage(Bot bot) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at BoosterCreator.WebRequest.GetBoosterPage(Bot bot) at BoosterCreator.BoosterHandler.CreateBooster(Bot bot, ConcurrentDictionary2 gameIDs)
at BoosterCreator.BoosterHandler.AutoBooster()
at BoosterCreator.BoosterHandler.<.ctor>b__6_0(Object e)
at System.Threading.Tasks.Task.<>c.b__128_1(Object state)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
2023-12-15 19:33:53|dotnet-12020|ERROR|ASF|Exit() Exiting with nonzero error code!
2023-12-15 19:33:53|dotnet-12020|INFO|Microsoft.Hosting.Lifetime|Application is shutting down...

Could not load type 'ArchiSteamFarm.Plugins.Interfaces.IBotCommand'

Error:

2022-03-03 00:40:41|dotnet-14196|ERROR|ASF|InitPlugins() Échec dû à une erreur : BoosterCreator, Version=1.2.1.0, Culture=neutral, PublicKeyToken=null
2022-03-03 00:40:41|dotnet-14196|ERROR|ASF|InitPlugins() System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load type 'ArchiSteamFarm.Plugins.Interfaces.IBotCommand' from assembly 'ArchiSteamFarm, Version=5.2.3.5, Culture=neutral, PublicKeyToken=504f46588cc351a9'.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at ArchiSteamFarm.Plugins.PluginsCore.InitPlugins()
System.TypeLoadException: Could not load type 'ArchiSteamFarm.Plugins.Interfaces.IBotCommand' from assembly 'ArchiSteamFarm, Version=5.2.3.5, Culture=neutral, PublicKeyToken=504f46588cc351a9'.

Possible Explanation:

[Deprecation] ASF plugins that implement IBotCommand interface or use Bot.HasAccess(), Commands.Response() functionality will need slight code changes in regards to changes done as part JustArchiNET/ArchiSteamFarm#2501. We tried our best to keep them working as part of this release - the deprecated functionality will be removed in the next release cycle.

https://github.com/JustArchiNET/ArchiSteamFarm/releases/tag/5.2.2.4

Useful references:

Error when execute command (System.MissingMethodException)

OnBotCommand() System.MissingMethodException: Method not found: '!!0 System.Linq.Enumerable.Min(System.Collections.Generic.IEnumerable1<!!0>)'. at BoosterCreator.BoosterHandler.CreateBooster(Bot bot, ConcurrentDictionary2 gameIDs)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at BoosterCreator.BoosterHandler.CreateBooster(Bot bot, ConcurrentDictionary2 gameIDs) at BoosterCreator.Commands.ResponseBooster(Bot bot, UInt64 steamID, String targetGameIDs) at ArchiSteamFarm.Utilities.InParallel[T](IEnumerable1 tasks)
at BoosterCreator.Commands.ResponseBooster(UInt64 steamID, String botNames, String targetGameIDs)
at BoosterCreator.Commands.Response(Bot bot, UInt64 steamID, String message, String[] args)
at BoosterCreator.BoosterCreator.OnBotCommand(Bot bot, UInt64 steamID, String message, String[] args)
at ArchiSteamFarm.Utilities.InParallel[T](IEnumerable`1 tasks)
at ArchiSteamFarm.Plugins.PluginsCore.OnBotCommand(Bot bot, UInt64 steamID, String message, String[] args)

Unable to parse time

Issue totally same as #2

ArchiSteamFarm V4.2.0.1
BoosterCreator V1.0.3.1

Thanks for your help.

Unable to parse time / System.ArgumentOutOfRangeException

2020-02-02 15:50:01|ArchiSteamFarm-5344|INFO|XXXXXXX|OnBotInitModules() GamesToBooster : XXXXXX
2020-02-02 15:50:01|ArchiSteamFarm-5344|INFO|ASF|.ctor() <XXXXXXX> Auto-attepmt to make booster from XXXXXX is planned at 02/02/2020 16:50

2020-02-02 16:52:03|ArchiSteamFarm-5344|INFO|ASF|CreateBooster() <XXXXXXX> Crafting booster from XXXXXX is not availiable now
2020-02-02 16:52:03|ArchiSteamFarm-5344|INFO|ASF|CreateBooster() Unable to parse time "3 Feb @ 1:19pm", please report this.

2020-02-02 17:00:02|ArchiSteamFarm-5344|INFO|ASF|CreateBooster() <XXXXXXX> Crafting booster from XXXXXX is not availiable now
2020-02-02 17:00:02|ArchiSteamFarm-5344|INFO|ASF|CreateBooster() Unable to parse time "3 Feb @ 1:19pm", please report this.
2020-02-02 17:00:02|ArchiSteamFarm-5344|FATAL|ASF|OnUnhandledException() System.ArgumentOutOfRangeException: Number must be either non-negative and less than or equal to Int32.MaxValue or -1. (Parameter 'dueTime')
   at System.Threading.Timer.Change(Int64 dueTime, Int64 period)
   at System.Threading.Timer.Change(TimeSpan dueTime, TimeSpan period)
   at BoosterCreator.BoosterHandler.CreateBooster(Bot bot, ConcurrentDictionary`2 gameIDs)
   at BoosterCreator.BoosterHandler.AutoBooster()
   at BoosterCreator.BoosterHandler.<.ctor>b__4_0(Object e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
2020-02-02 17:00:02|ArchiSteamFarm-5344|ERROR|ASF|Exit() Exiting with nonzero error code!

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.