Giter VIP home page Giter VIP logo

steam-irc-bot's Introduction

Steam IRC Bot

This is the Steam info IRC bot running in #opensteamworks on GameSurge.

In order to build it, you'll need to check out SteamKit2 tip, and you'll need SmartIrc4net.

steam-irc-bot's People

Contributors

doctormckay avatar god-tony avatar psychonic avatar voided avatar yaakov-h avatar yesitskev avatar

Stargazers

 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

steam-irc-bot's Issues

.NET core console app

  • Drop windows service bits
  • Convert into console app
  • Upgrade to .NET standard 2.0 version of SteamKit
  • SmartIrc4Net?

WebAPI exceptions

5:11:06 PM [ERROR] Program: Unhandled exception (IsTerm: True): System.AggregateException: One or more errors occurred. ---> System.IO.InvalidDataException: An internal error occurred when attempting to parse the response from the WebAPI server. This can indicate a change in the VDF format. ---> System.Exception: LoadFromBuffer: missing {
   at SteamKit2.KVTextReader..ctor(KeyValue kv, Stream input)
   at SteamKit2.KeyValue.ReadAsText(Stream input)
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()
   --- End of inner exception stack trace ---

Server stack trace: 
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()

Exception rethrown at [0]: 
   at SteamKit2.WebAPI.Interface.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
   at CallSite.Target(Closure , CallSite , Object , UInt32 , UInt32 )
   at SteamIrcBot.UpToDateJob.<OnRun>b__2_0(ImportantApp app)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body)
   at SteamIrcBot.UpToDateJob.OnRun()
   at SteamIrcBot.JobManager.<>c.<OnTick>b__6_0(Job j)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at SteamIrcBot.JobManager.OnTick(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()
---> (Inner Exception #0) System.IO.InvalidDataException: An internal error occurred when attempting to parse the response from the WebAPI server. This can indicate a change in the VDF format. ---> System.Exception: LoadFromBuffer: missing {
   at SteamKit2.KVTextReader..ctor(KeyValue kv, Stream input)
   at SteamKit2.KeyValue.ReadAsText(Stream input)
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()
   --- End of inner exception stack trace ---

Server stack trace: 
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()

Exception rethrown at [0]: 
   at SteamKit2.WebAPI.Interface.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
   at CallSite.Target(Closure , CallSite , Object , UInt32 , UInt32 )
   at SteamIrcBot.UpToDateJob.<OnRun>b__2_0(ImportantApp app)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #1) System.IO.InvalidDataException: An internal error occurred when attempting to parse the response from the WebAPI server. This can indicate a change in the VDF format. ---> System.Exception: LoadFromBuffer: missing {
   at SteamKit2.KVTextReader..ctor(KeyValue kv, Stream input)
   at SteamKit2.KeyValue.ReadAsText(Stream input)
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()
   --- End of inner exception stack trace ---

Server stack trace: 
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()

Exception rethrown at [0]: 
   at SteamKit2.WebAPI.Interface.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
   at CallSite.Target(Closure , CallSite , Object , UInt32 , UInt32 )
   at SteamIrcBot.UpToDateJob.<OnRun>b__2_0(ImportantApp app)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #2) System.IO.InvalidDataException: An internal error occurred when attempting to parse the response from the WebAPI server. This can indicate a change in the VDF format. ---> System.Exception: LoadFromBuffer: missing {
   at SteamKit2.KVTextReader..ctor(KeyValue kv, Stream input)
   at SteamKit2.KeyValue.ReadAsText(Stream input)
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()
   --- End of inner exception stack trace ---

Server stack trace: 
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()

Exception rethrown at [0]: 
   at SteamKit2.WebAPI.Interface.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
   at CallSite.Target(Closure , CallSite , Object , UInt32 , UInt32 )
   at SteamIrcBot.UpToDateJob.<OnRun>b__2_0(ImportantApp app)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #3) System.IO.InvalidDataException: An internal error occurred when attempting to parse the response from the WebAPI server. This can indicate a change in the VDF format. ---> System.Exception: LoadFromBuffer: missing {
   at SteamKit2.KVTextReader..ctor(KeyValue kv, Stream input)
   at SteamKit2.KeyValue.ReadAsText(Stream input)
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()
   --- End of inner exception stack trace ---

Server stack trace: 
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()

Exception rethrown at [0]: 
   at SteamKit2.WebAPI.Interface.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
   at CallSite.Target(Closure , CallSite , Object , UInt32 , UInt32 )
   at SteamIrcBot.UpToDateJob.<OnRun>b__2_0(ImportantApp app)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #4) System.IO.InvalidDataException: An internal error occurred when attempting to parse the response from the WebAPI server. This can indicate a change in the VDF format. ---> System.Exception: LoadFromBuffer: missing {
   at SteamKit2.KVTextReader..ctor(KeyValue kv, Stream input)
   at SteamKit2.KeyValue.ReadAsText(Stream input)
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()
   --- End of inner exception stack trace ---

Server stack trace: 
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()

Exception rethrown at [0]: 
   at SteamKit2.WebAPI.Interface.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
   at CallSite.Target(Closure , CallSite , Object , UInt32 , UInt32 )
   at SteamIrcBot.UpToDateJob.<OnRun>b__2_0(ImportantApp app)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #5) System.IO.InvalidDataException: An internal error occurred when attempting to parse the response from the WebAPI server. This can indicate a change in the VDF format. ---> System.Exception: LoadFromBuffer: missing {
   at SteamKit2.KVTextReader..ctor(KeyValue kv, Stream input)
   at SteamKit2.KeyValue.ReadAsText(Stream input)
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()
   --- End of inner exception stack trace ---

Server stack trace: 
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()

Exception rethrown at [0]: 
   at SteamKit2.WebAPI.Interface.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
   at CallSite.Target(Closure , CallSite , Object , UInt32 , UInt32 )
   at SteamIrcBot.UpToDateJob.<OnRun>b__2_0(ImportantApp app)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

---> (Inner Exception #6) System.IO.InvalidDataException: An internal error occurred when attempting to parse the response from the WebAPI server. This can indicate a change in the VDF format. ---> System.Exception: LoadFromBuffer: missing {
   at SteamKit2.KVTextReader..ctor(KeyValue kv, Stream input)
   at SteamKit2.KeyValue.ReadAsText(Stream input)
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()
   --- End of inner exception stack trace ---

Server stack trace: 
   at SteamKit2.WebAPI.AsyncInterface.<CallAsyncCore>d__7.MoveNext()

Exception rethrown at [0]: 
   at SteamKit2.WebAPI.Interface.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
   at CallSite.Target(Closure , CallSite , Object , UInt32 , UInt32 )
   at SteamIrcBot.UpToDateJob.<OnRun>b__2_0(ImportantApp app)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )<---

Memory leak?

Tracking this so I don't forget about it. Working set seems to be ballooning to 3.5GB on my VM over time.

Not sure about the cause, but I attached ANTS so we'll see if I can repro.

Docker-ize

  • Depends on all of #19, unless using a windows host
  • Replace file logging with stdout, we'll let docker handle logging
  • Local appinfo/ugc/etc cache? Don't really want to introduce separate volumes

Azure CV Exceptions

Probably need better logging/messaging.

7:00:20 PM [ERROR] Spiders: Error occurred while submitting image for analysis: Microsoft.ProjectOxford.Vision.ClientException: Exception of type 'Microsoft.ProjectOxford.Vision.ClientException' was thrown.
   at Microsoft.ProjectOxford.Vision.VisionServiceClient.HandleException(Exception exception)
   at Microsoft.ProjectOxford.Vision.VisionServiceClient.<SendAsync>b__42_1[TRequest,TResponse](Exception e)
   at System.AggregateException.Handle(Func`2 predicate)
   at Microsoft.ProjectOxford.Vision.VisionServiceClient.<SendAsync>d__42`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ProjectOxford.Vision.VisionServiceClient.<AnalyzeImageAsync>d__21`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CallSite.Target(Closure , CallSite , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at Microsoft.ProjectOxford.Vision.VisionServiceClient.<AnalyzeImageAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SteamIrcBot.Spiders.<OnMessage>d__1.MoveNext()

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.