Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6954

Exception while creating the file banned-ips.json.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • None
    • [21:10:07] [Server thread/INFO]: This server is running CraftBukkit version 3442-Spigot-699290c-62d9762 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) [21:10:07] [Server thread/INFO]: Checking version, please wait... [21:10:07] [Thread-2220
    • Yes

      After migrating from CraftBukkit to Spigot, starting Spigot for the first time I see in the early steps this warning followed by an exception:

      [10:02:37] [Server thread/WARN]: Unable to read file banned-ips.json, backing it up to {0}.backup and creating new copy.
      com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonArray but was com.google.gson.JsonPrimitive
              at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:911) ~[gson-2.8.8.jar:?]
              at com.google.gson.Gson.fromJson(Gson.java:932) ~[gson-2.8.8.jar:?]
              at com.google.gson.Gson.fromJson(Gson.java:870) ~[gson-2.8.8.jar:?]
              at net.minecraft.server.players.JsonList.f(JsonList.java:163) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
              at net.minecraft.server.dedicated.DedicatedPlayerList.y(SourceFile:76) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
              at net.minecraft.server.dedicated.DedicatedPlayerList.<init>(SourceFile:25) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
              at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:194) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
              at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:994) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
              at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3442-Spigot-699290c-62d9762]
              at java.lang.Thread.run(Thread.java:833) [?:?] 

       

      Looks like you have an error in the code that generates the file banned-ips.json.

            Unassigned Unassigned
            GTP Giacomo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: