roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2
https://docs.cssharp.dev
Other
769 stars 119 forks source link

Failed to load admin data #511

Closed Geant200 closed 1 month ago

Geant200 commented 3 months ago

Hello I have the latest version I encounter crashes and in my log file this is the result??.

Thanks in advance.

2024-06-23 17:28:29.925 +02:00 [EROR] (cssharp:AdminManager) Failed to load admin data
System.Text.Json.JsonException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
 ---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at CounterStrikeSharp.API.Modules.Admin.AdminManager.LoadAdminData(String adminDataPath) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Admin/AdminPermissions.cs:line 129
2024-06-23 17:28:30.648 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item
2024-06-23 17:28:30.648 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item
2024-06-23 17:28:30.648 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item
2024-06-23 17:28:30.649 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item
2024-06-23 17:28:30.649 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item
2024-06-23 17:28:30.649 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item
roflmuffin commented 2 months ago

Most likely cause is a permission issue on the admins json file in /game/csgo/addons/counterstrikesharp/configs/admins.json that prevents it from being read, or it is an empty file.

github-actions[bot] commented 2 months ago

This issue has been marked needs-author-action and may be missing some important information.

github-actions[bot] commented 1 month ago

This issue has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

github-actions[bot] commented 1 month ago

This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days.