prom3theu5 / ConanExilesServerUpdater

Dedicated Server Updater For Conan Exiles
Apache License 2.0
11 stars 2 forks source link

Crash after a few mins #15

Closed xenthal closed 7 years ago

xenthal commented 7 years ago

Seems almost every time the program crashes after several minutes (once it ran for an hour orso)

Here is the latest log file hopefully it helps (or you can help me get it to not happen :p)

2017-02-12 04:48:07.521 +01:00 [Information] Loaded settings from file: "config.json" 2017-02-12 04:48:07.543 +01:00 [Information] Loaded Messages from file: "messages.json" 2017-02-12 04:48:07.588 +01:00 [Information] Configuration Result: "[Success] Name ConanExilesUpdater [Success] DisplayName ConanExilesUpdater (Instance: ConanExilesUpdater) [Success] Description Conan Exiles Server Updater [Success] InstanceName ConanExilesUpdater [Success] ServiceName ConanExilesUpdater$ConanExilesUpdater" 2017-02-12 04:48:07.591 +01:00 [Information] "Topshelf" v"4.0.0.0", .NET Framework v"4.0.30319.42000" 2017-02-12 04:48:07.605 +01:00 [Debug] Running as a console application, creating the console host. 2017-02-12 04:48:07.636 +01:00 [Debug] Starting up as a console application 2017-02-12 04:48:07.646 +01:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service is now running, press Control+C to exit. 2017-02-12 04:48:07.677 +01:00 [Information] ConanExilesUpdater Started Running 02/12/2017 03:48:07 2017-02-12 04:48:07.779 +01:00 [Information] Starting To Monitor Server is Running 2017-02-12 04:48:07.782 +01:00 [Information] Setting up Raiding Hours Protection 2017-02-12 04:48:08.524 +01:00 [Information] Discord Connected! 2017-02-12 04:48:37.794 +01:00 [Fatal] The service threw an unhandled exception System.NullReferenceException: Object reference not set to an instance of an object. at ConanExilesUpdater.Services.DiscordService.d5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b6_1(Object state) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() 2017-02-12 04:48:37.800 +01:00 [Information] Stopping the "ConanExilesUpdater$ConanExilesUpdater" service 2017-02-12 04:48:37.932 +01:00 [Information] The "ConanExilesUpdater$ConanExilesUpdater" service has stopped.

Aoxmodeus commented 7 years ago

As a workaround till prom3theu5 can get to it, can you try setting accounce to discord to false for now, and see if you get a stable run after that?

prom3theu5 commented 7 years ago

Indeed - this is an issue with your discord token, it is set incorrectly. You need to create a discord bot account, not use a discord widget token. You either have an incorrect token, or have discord turned on but no token set.

Please see the short guide Here which shows you how to create a discord account.

After that, you need to find your discord channel id. Put discord into developer mode by using the Gear (Options) and going to appearance, then ticking the developer box. Next go to your required text channel, right click it - and click the new option at the bottom Copy-ID

xenthal commented 7 years ago

Ah you're right I never added the bot to the server was the problem, I've gotten so used to using a account for my bot instead of the new oauth2 stuff that I forgot that bit. Just did the realize it was related to discord as that error doesn't really reflect that :p

prom3theu5 commented 7 years ago

:) no problem

Aye it's not very descriptive as it's in a background thread. I will change that next time I make a release :)