egebilecen / PZServerDiscordBot

A Project Zomboid Discord Bot written in C# using Discord.NET to manage and execute commands on Project Zomboid Server.
GNU General Public License v3.0
62 stars 11 forks source link

Error #49

Closed mounti03 closed 1 year ago

mounti03 commented 1 year ago

Adsız

egebilecen commented 1 year ago

Merhaba,

Aldığın hatayı kontrol ettim. Yaşanan sıkıntı Steam'in serverlerine gönderilen isteğe cevap gelmemesi ile alakalı. Sizin internet sağlayıcınızla ilgili bir problem olabilir.

MaximusPT commented 1 year ago

Hi egebilecen,

First of all, very very good job with the BOT, it's what we needed for the daily tasks!! Thank You!!!

I've been looking at the logs, and the same error also occurs to me, also today, 25/12:


Exception: System.ArgumentNullException Message: Value cannot be null. Parameter name: s Stack trace: at System.IO.StringReader..ctor(String s) at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings) at SteamWebAPI.d3.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Util\SteamWebAPI.cs:line 80 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Schedules.<>cDisplayClass4_0.<b__0>d.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Schedules\WorkshopItemUpdateChecker.cs:line 52 Date: 25/12/2022 11:02:00 UTC Bot Version: v1.8.1 Exception occured in ScheduleItem callback function. ScheduleItem: WorkshopItemUpdateChecker (THIS IS AN INNER EXCEPTION, NUMBER 1)

[25/12/2022 11:02:00 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping... [25/12/2022 11:02:30 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping... [25/12/2022 11:03:00 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping... [25/12/2022 11:03:30 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping... [25/12/2022 11:04:00 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...

Thank you for you time, hug from Portugal.

egebilecen commented 1 year ago

Hey, I am glad to hear you liked the bot. So, about the error you are having, only reason I can think of about the error you are getting is that Steam Web API doesn't return a proper response. There could be several reasons for this to happen: Your IP might be blacklisted, your internet provider might be blocking requests to the server, etc. I will try to add some more logging but unfortunately this error something I cannot fix because several of servers are actively using the bot version 1.8.1 and they aren't having any issues with the Steam Web API responses.

MaximusPT commented 1 year ago

Hey, I am glad to hear you liked the bot. So, about the error you are having, only reason I can think of about the error you are getting is that Steam Web API doesn't return a proper response. There could be several reasons for this to happen: Your IP might be blacklisted, your internet provider might be blocking requests to the server, etc. I will try to add some more logging but unfortunately this error something I cannot fix because several of servers are actively using the bot version 1.8.1 and they aren't having any issues with the Steam Web API responses.

ok ok, thank you

HeyBront commented 1 year ago

Hello, just checking if my error is the same. I get this additional BadRequest event in my logs:

---------------
[07/03/2023 20:37:56 UTC] WebRequest.PostAsync() - Response status code is not 200. Status code: BadRequest | URL: https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1/

---------------
Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: s
Stack trace: at System.IO.StringReader..ctor(String s)
   at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings)
   at SteamWebAPI.<GetWorkshopItemDetails>d__3.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Util\SteamWebAPI.cs:line 80
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Schedules.<>c__DisplayClass4_0.<<WorkshopItemUpdateChecker>b__0>d.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Schedules\WorkshopItemUpdateChecker.cs:line 52
Date: 07/03/2023 20:37:56 UTC
Bot Version: v1.9.0
Exception occured in ScheduleItem callback function. ScheduleItem: WorkshopItemUpdateChecker
(THIS IS AN INNER EXCEPTION, NUMBER 1)
---------------

I don't have any issues connecting to Steam servers previously, asking here before I spend more time troubleshooting my environment. Thank you

HeyBront commented 1 year ago

Sorry @egebilecen for necroposting, this is my first Github post :)

egebilecen commented 1 year ago

Hello, just checking if my error is the same. I get this additional BadRequest event in my logs:

---------------
[07/03/2023 20:37:56 UTC] WebRequest.PostAsync() - Response status code is not 200. Status code: BadRequest | URL: https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1/

---------------
Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: s
Stack trace: at System.IO.StringReader..ctor(String s)
   at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings)
   at SteamWebAPI.<GetWorkshopItemDetails>d__3.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Util\SteamWebAPI.cs:line 80
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Schedules.<>c__DisplayClass4_0.<<WorkshopItemUpdateChecker>b__0>d.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Schedules\WorkshopItemUpdateChecker.cs:line 52
Date: 07/03/2023 20:37:56 UTC
Bot Version: v1.9.0
Exception occured in ScheduleItem callback function. ScheduleItem: WorkshopItemUpdateChecker
(THIS IS AN INNER EXCEPTION, NUMBER 1)
---------------

I don't have any issues connecting to Steam servers previously, asking here before I spend more time troubleshooting my environment. Thank you

Hey, is it started to happen recently? BadRequest I mean.

HeyBront commented 1 year ago

I installed the bot a month ago and the ModUpdateChecker has never worked for me. It has been this BadRequest error since I started checking the logs.

egebilecen commented 1 year ago

I see. Well, I can't really comment as it works on many servers. I believe it's just your country blacklisted by steam or maybe your host? Not sure and there isn't anything I can do about it, sadly.

HeyBront commented 1 year ago

I understand, I'll see if I can track down the issue and will post back if I find a solution.