mojira.dev
MC-82968

Kicked from server when in certain area: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1

Summary:
I had a server on 1.8 with a few friends. Today I upgraded it to the first 1.9 snapshot and kept the world.

When entering the server I see the world for ca. 0.1 sec then the following error message:
"Connection Lost

Internal Exception: io.netty.handler.codec.DecoderException: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 2" (and then the button "Back to server list")

I then tried this a few times and then started a new server which worked but as soon as I placed down a sign I got kicked again. I was not able to edit the sign.

What I expected: No error message.

What actually happened: see error message above.

Steps to reproduce:
Start Minecraft Launcher.
Download Minecraft Server from mojang.com.
Start Minecraft server on same Computer.
Log into minecraft.
Click "Multiplayer".
Click "Direct Connect".
Enter 127.0.0.1 and Click "Join Server".
Place down sign.

Server output:
http://pastebin.com/ey3N1fcz

Server config:
http://pastebin.com/KSZAh1Zk

Linked issues

MC-40231 Malformed Json Resolved MC-82881 Teleportation Error Resolved MC-82908 Rendering signs from 1.8 causes player to crash. Resolved MC-83031 Multiplayer Server Not Working (w/ error statement) Resolved MC-83094 Multiplayer Issue Resolved

Attachments

Comments 60

From what I've found out so far, the issue is this:

This happens when a sign is within loading distance of the player. They will be kicked. If they are not within range of a sign, they don't get kicked.

@Colm Overy: Tried that, seems to be the issue. Adjusted the debug report accordingly. Thanks!

Hi ! Yes I have the same problem when I put a sign on a wall or on the groud and after I can't access to my server and I have to take the backup I made 5 minutes before.

Fenhl (Max Dominik Weber)

@unknown seems to be aware of the issue: https://twitter.com/SeargeDP/status/626414559100829696

Anthony Martin

Upgraded to 15w31b on both client and server. While there was no corresponding error in the SMP server log, the client cannot connect (see attached screen shot from 15w31b client).

50 more comments

The JSON must be formatted validly and you also need to specify that each empty line is empty.

For me the issue is now fixed in 15w39b.
Everything seems to work fine, though I am only testing a sign. I do not get any chunk errors anymore.
Thanks!

Still happens for me in 13w39c. The following command kicks the player instantly.

/setblock ~ ~-1 ~ minecraft:wall_sign 4 replace {Text1:"{\"text\":\"私の名刺に私は企業の社長です\"}",Text2:"{\"text\":\"私の心の中で私は開発者です\"}",Text3:"{\"text\":\"しかし、心で、私はゲーマーです\"}"}

It should happen with any text. This is just the one I was trying to place.

@Liam
I think you have ill-formated Json in your commandblock. In these snapshots you need to specify each line on the sign, even if they are empty: so i tried your command in 15w39b and it crashed indeed. But after adding Text4 as in the command below, everything works fine.

/setblock ~ ~-1 ~ minecraft:wall_sign 4 replace {Text1:"{\"text\":\"私の名刺に私は企業の社長です\"}",Text2:"{\"text\":\"私の心の中で私は開発者です\"}",Text3:"{\"text\":\"しかし、心で、私はゲーマーです\"}",Text4:"{\"text\":\"\"}"}

Well that I blame on MCStacker then. They've supposedly updated for the snapshots, but clearly haven't addressed everything. Still, it shouldn't cause a kick or a crash. The worst it should do is just not work and spit out the error within the console or command block. (Like the Title command for instance) If there's one thing a game shouldn't do, it's go apeshit when you input something it doesn't like. 😛

Max Staff

Erik Broes

Confirmed

Minecraft 15w31a, Minecraft 15w31b, Minecraft 15w31c

Minecraft 15w32b

Retrieved