Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-97531

Confusing error message when using run_command

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 1.8.9, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.9
    • None
    • Confirmed

      Note to moderators: This bug report is NOT a duplicate from MC-30955. Mojang don't want correct the tellraw lenght limit: ok no problem, but this bug report is about random error message with book ! It's not "work as intented" that book generate the error "invalid json" when json is valid. If Mojang want limit the command size, it should display an error message like "command lenght is too long", or better: forbid the creation of corrupted book, or may be remove this nonsense limitation for book (I don't speak about tellraw here). A proof that "Work as intented" about the tellraw bug is not related to the book bug is this other bug: MC-70317. The tellraw command is a chat command, with chat limitation: ok. The book is not chat related, that's why the suggest_command don't work (MC-70317), and that's why the limitation for book (and random error message and corrupted book) are not Work As Intented. It should be Mojang to decide if it's intented or not and what is the solution because it's not the same bug. Thanks for your attention.

      There are an error in the book with the run_command tag when text command is more than 100 chars length:

      1/ If the text in run_command is too long, it is troncated:

      Exemple with this book:

      /give @p written_book 1 0 {pages:["{\"text\":\"Hello World\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/say Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft\"} }"],title:"",author:""}

      The give command is valid, but when I click in the book, the text is truncated
      (see screenshot 1)
      The command outside the book work with no problem:

      /say Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft



      2/ If I use a formatted text, there are an error. I try with the same example as 1/, but with yellow color displayed with a tellraw command:

      /give @p written_book 1 0 {pages:["{\"text\":\"Hello World\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/tellraw @a {\\\"text\\\":\\\"Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft\\\",\\\"color\\\":\\\"yellow\\\"}\"} }"],title:"",author:""}

      When I click on the link, the following error occured:

      Invalid json: Unterminated string at line 1 column 89

      (see screenshot 2)

      The command outside the book work with no problem:

      /tellraw @a {"text":"Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft Minecraft","color":"yellow"}

      (see screenshot 3)

      3/ The real problem with this bug is for tools book, it's impossible to make a custom tools book with complex command. For exemple, this book can spawn a zombie with a Full P4 diamond armor:

      /give @p written_book 1 0 {pages:["{\"text\":\"Super Zombie\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/summon Zombie ~ ~1 ~ {ArmorItems:[{tag:{ench:[{id:0,lvl:4}]},id:\\\"minecraft:diamond_boots\\\"},{tag:{ench:[{id:0,lvl:4}]},id:\\\"minecraft:diamond_leggings\\\"},{tag:{ench:[{id:0,lvl:4}]},id:\\\"minecraft:diamond_chestplate\\\"},{id:\\\"minecraft:diamond_helmet\\\",tag:{ench:[{id:0,lvl:4}]} }]}\"} }"],title:"",author:""}

      When I click on the link, the following error occured:

      Data tag parsing failed: Unbalanced brackets: {ArmorItems:.....{tag:{en

      (see screenshot 4)

      The command outside the book work with no problem:

      /summon Zombie ~ ~1 ~ {ArmorItems:[{tag:{ench:[{id:0,lvl:4}]},id:"minecraft:diamond_boots"},{tag:{ench:[{id:0,lvl:4}]},id:"minecraft:diamond_leggings"},{tag:{ench:[{id:0,lvl:4}]},id:"minecraft:diamond_chestplate"},{id:"minecraft:diamond_helmet",tag:{ench:[{id:0,lvl:4}]} }]}

      (see screenshot 5)

      The displayed error is always different, for a unique bug.
      I report this bug because many users of my book generator report to me this problem, but I can't help them, it's a bug with Minecraft.

        1. screenshot5.png
          screenshot5.png
          870 kB
        2. screenshot4.png
          screenshot4.png
          525 kB
        3. screenshot3.png
          screenshot3.png
          538 kB
        4. screenshot2.png
          screenshot2.png
          572 kB
        5. screenshot1.png
          screenshot1.png
          1.08 MB

            searge [Mojang] Searge (Michael Stoyke)
            Tronics Tronics
            Votes:
            22 Vote for this issue
            Watchers:
            45 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: