Sehelitar / Kick.bot

A powerful Kick integration for Streamer.bot
https://sehelitar.tv/
GNU Affero General Public License v3.0
19 stars 4 forks source link

[BUG] Error When doing Shoutout Commands. #48

Closed Jyojibh closed 5 months ago

Jyojibh commented 6 months ago

Getting the error below from the logs and my StreamerBot just locked up after and wont run any commands after this. this is how i've got the setup in Sub Actions.

image

[2024-03-13 23:46:23.925 DBG] [Kick] An error occurred while trying to change chat mode : System.AggregateException: One or more errors occurred. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   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.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Kick.KickClient.<APIGet>d__48`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 Kick.KickClient.<GetChannelInfos>d__0.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at Kick.Bot.BotClient.GetClips(Dictionary`2 args, Channel channel)
---> (Inner Exception #0) Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   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.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Kick.KickClient.<APIGet>d__48`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 Kick.KickClient.<GetChannelInfos>d__0.MoveNext()<---
Jyojibh commented 6 months ago

Additionally getting this error when i shutdown Streamer bot.

[2024-03-13 23:55:43.436 FTL] Fatal UI Exception
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'The ThreadLocal object has been disposed.'.
   at System.Threading.ThreadLocal`1.GetValueSlow()
   at System.Collections.Concurrent.ConcurrentBag`1.GetThreadList(Boolean forceCreate)
   at LiteDB.Engine.DiskReader.Dispose()
   at LiteDB.Engine.TransactionService.Dispose(Boolean dispose)
   at LiteDB.Engine.TransactionService.Finalize()
[2024-03-13 23:55:43.590 INF] BTTV :: WebSocket Disconnected
[2024-03-13 23:55:43.593 DBG] Twitch (Bot) :: Disconnected
[2024-03-13 23:55:43.594 INF] TwitchService :: Disconnected from Bot Chat Client
[2024-03-13 23:55:48.965 INF] Closing services...
[2024-03-13 23:55:48.965 DBG] UsbRemovalWatcher :: Disposed
[2024-03-13 23:55:48.965 DBG] ProcessWatcher :: Disposed
[2024-03-13 23:55:48.965 DBG] ProcessWatcher :: Disposed
[2024-03-13 23:55:48.965 DBG] Websocket Client :: Disconnecting from all connected clients
[2024-03-13 23:55:48.965 DBG] MIDI Service :: Stopping service
[2024-03-13 23:55:48.965 DBG] DonorDrive :: Stopping service
[2024-03-13 23:55:48.965 DBG] Websocket Custom Server :: Stopping all servers
[2024-03-13 23:55:48.965 DBG] FileTailDaemon :: Waiting for file tails to shut down
[2024-03-13 23:55:48.966 DBG] Http Listener :: Channel is not active
[2024-03-13 23:55:48.965 DBG] SLOBS Service :: Stopping service
[2024-03-13 23:55:48.965 DBG] ActionDispatcher :: Shutting down action queues
[2024-03-13 23:55:48.966 ERR] ActionDispatcher :: Queue count mismatch
[2024-03-13 23:55:48.966 DBG] ActionQueue :: Shutting down queue 00000000-0000-0000-0000-000000000000 thread
[2024-03-13 23:55:48.965 INF] InlineCode :: Cleaning up '1' execute code instances
[2024-03-13 23:55:48.965 DBG] SpeechToText :: Channel was null when trying to stop
[2024-03-13 23:55:48.966 DBG] InlineCode :: Unloading 'bd1a220c10854680a76c8ed7e6a32b59'
[2024-03-13 23:55:48.966 DBG] ActionQueue :: Shutting down queue 9ea4acd4-ce8a-407c-b7f5-ac091ea15d60 thread
[2024-03-13 23:55:48.966 DBG] ActionQueue :: Shutting down queue 37e80233-8460-49db-bf7d-eee03321d445 thread
[2024-03-13 23:55:48.966 DBG] ActionQueue :: Shutting down queue b61e8c12-1f63-45ad-8479-7a3b19e3207b thread
[2024-03-13 23:55:48.966 DBG] InlineCode :: Unable to dispose of 'bd1a220c10854680a76c8ed7e6a32b59', check your Dispose method for errors.
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.
   at _Ceu6kwnmCZ0czfQoRtuWCf2ubtI._oefjXErcfFRl7rMOsyBPCHMIivc()
   at _PHy0xaC2tdNwDAXjn2ilHodGIW._YUJbtcQxnCNO6AZhDbK8sSgI5ld()
[2024-03-13 23:55:48.965 DBG] FileWatcherDaemon :: Waiting for file watchers to shut down
[2024-03-13 23:55:48.965 DBG] OBS Service :: Stopping service
[2024-03-13 23:55:48.965 DBG] UDP Listener :: Channel is not active
[2024-03-13 23:55:48.969 WRN] Exception occurred during shutdown
System.AggregateException: One or more errors occurred. ---> System.AppDomainUnloadedException: Attempted to access an unloaded appdomain. (Exception from HRESULT: 0x80131014)
   at System.AppDomain.Unload(AppDomain domain)
   at _PHy0xaC2tdNwDAXjn2ilHodGIW._YUJbtcQxnCNO6AZhDbK8sSgI5ld()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.AppDomainUnloadedException: Attempted to access an unloaded appdomain. (Exception from HRESULT: 0x80131014)
   at System.AppDomain.Unload(AppDomain domain)
   at _PHy0xaC2tdNwDAXjn2ilHodGIW._YUJbtcQxnCNO6AZhDbK8sSgI5ld()
   at System.Threading.Tasks.Task.Execute()<---
Jyojibh commented 6 months ago

Adding more context, Once I had Disabled all the additional clip stuff and do a shoutout command it not longer locks out the streamerbot But I am still getting the Fatal Error issue. I am on Version 0.3.12 as well :)

Jyojibh commented 5 months ago

This seems to have been sorted with the latest upgrade from #50