Minecraft Vanilla crash IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1

minecraft-java-editiontechnical-issues

Whenever I click the icon on my desktop to get to Minecraft, the launcher loads as usual, like it should. But when I click the "Play" button, the launcher goes away, but then comes back saying this:

[17:15:14] [Client thread/INFO]: Setting user: kassidygallowway
[17:15:14] [Client thread/INFO]: (Session ID is token:7b2075512917473abe32b04ffd11b2a4:ce288cc1399b4266a07c19cc48d47531)
Exception in thread "Client thread" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1
    at com.google.gson.Gson.fromJson(Gson.java:815)
    at com.google.gson.Gson.fromJson(Gson.java:768)
    at lu.b(SourceFile:151)
    at lu.<init>(SourceFile:43)
    at net.minecraft.server.MinecraftServer.<init>(SourceFile:155)
    at bpp.<init>(SourceFile:41)
    at avf.<init>(SourceFile:293)
    at net.minecraft.client.main.Main.main(SourceFile:124)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1
    at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:338)
    at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:79)
    at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)
    at com.google.gson.Gson.fromJson(Gson.java:803)
    ... 7 more

I have no idea what this means (I dont know codes or anything like that). It does this over and over again, no matter how many times I press Play.

Best Answer

This is a known issue with Minecraft where it sometimes breaks some of the files that store its data. It means that the .json files in your Minecraft version folders are broken.

Fix 1 - Remove just the version folder:

Most of the time it's only one or two files in your current version's folder that are causing the problem. To fix this, navigate* to:

C:\Users\<your PC username>\AppData\Roaming\.minecraft\versions

and delete the version folder you are trying to load. Then start the game again, and try launching that version again, which will force Minecraft to re-download it.

You can navigate to this folder by either opening an Explorer window and copy/pasting the path into the address bar, or by pushing the Windows key and R at the same time, and typing %AppData% (with the percentage signs) into the prompt. Once there, open the .minecraft folder.


Fix 2 - Remove everything except your world saves:

If the above doesn't fix the issue, then you will need to try removing more than just your version folder: This is Mojang's recommended fix:

For some people, reinstalling fixes this issue. To do so, press your Windows+R keys, type in %AppData% at the dialog, and press Enter. In the window that appears, open the .minecraft directory, and delete everything except for the saves directory that you see therein. Then, try running Minecraft again.

Remove everything in your .minecraft folder except the 'saves' folder. The saves folder contains your worlds, removing it will delete all your worlds.


Fix 3 - Remove your world's statistics:

Sometimes, it may be the files used to save your statistics that causes the issue.

Carefully navigate inside saves folder to .minecraft\saves\<yourworldname>\stats and delete the files there. This will reset your stats (number of blocks broken etc) but may fix this issue.

References: