LuckPerms

LuckPerms

41.4k Downloads

RuntimeException: Processor - MalformedJsonException: Unterminated string at line 42357 column 11 path $[5309].actedName

mibby opened this issue ยท 3 comments

commented

LuckPerms dev 918

Whenever I run some luckperms operations, this error occurs in console.

I had some data corruption recently that was resolved. Could there be a broken user yaml file causing luck perms to error? Though the error message doesn't really point to any specific user.

[20:47:42] [luckperms-worker-13/WARN]: java.lang.RuntimeException: Processor me.lucko.luckperms.common.cache.BufferedRequest$$Lambda$4789/629320791@3f68b547 threw an exception whilst computing a result
[20:47:42] [luckperms-worker-13/WARN]: 	at me.lucko.luckperms.common.cache.BufferedRequest$Processor$BoundTask.run(BufferedRequest.java:172)
[20:47:42] [luckperms-worker-13/WARN]: 	at me.lucko.luckperms.common.plugin.scheduler.AbstractJavaScheduler$ErrorReportingRunnable.run(AbstractJavaScheduler.java:106)
[20:47:42] [luckperms-worker-13/WARN]: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[20:47:42] [luckperms-worker-13/WARN]: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[20:47:42] [luckperms-worker-13/WARN]: 	at java.lang.Thread.run(Thread.java:748)
[20:47:42] [luckperms-worker-13/WARN]: Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 42357 column 11 path $[5309].actedName
[20:47:42] [luckperms-worker-13/WARN]: 	at com.google.gson.internal.Streams.parse(Streams.java:60)
[20:47:42] [luckperms-worker-13/WARN]: 	at com.google.gson.JsonParser.parse(JsonParser.java:84)
[20:47:42] [luckperms-worker-13/WARN]: 	at me.lucko.luckperms.common.storage.implementation.file.FileActionLogger.flush(FileActionLogger.java:95)
[20:47:42] [luckperms-worker-13/WARN]: 	at me.lucko.luckperms.common.storage.implementation.file.FileActionLogger$SaveBuffer.perform(FileActionLogger.java:140)
[20:47:42] [luckperms-worker-13/WARN]: 	at me.lucko.luckperms.common.storage.implementation.file.FileActionLogger$SaveBuffer.perform(FileActionLogger.java:133)
[20:47:42] [luckperms-worker-13/WARN]: 	at me.lucko.luckperms.common.cache.BufferedRequest$Processor$BoundTask.run(BufferedRequest.java:169)
[20:47:42] [luckperms-worker-13/WARN]: 	... 4 more
[20:47:42] [luckperms-worker-13/WARN]: Caused by: com.google.gson.stream.MalformedJsonException: Unterminated string at line 42357 column 11 path $[5309].actedName
[20:47:42] [luckperms-worker-13/WARN]: 	at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559)
[20:47:42] [luckperms-worker-13/WARN]: 	at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1017)
[20:47:42] [luckperms-worker-13/WARN]: 	at com.google.gson.stream.JsonReader.nextName(JsonReader.java:787)
[20:47:42] [luckperms-worker-13/WARN]: 	at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:739)
[20:47:42] [luckperms-worker-13/WARN]: 	at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:731)
[20:47:42] [luckperms-worker-13/WARN]: 	at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:714)
[20:47:42] [luckperms-worker-13/WARN]: 	at com.google.gson.internal.Streams.parse(Streams.java:48)
[20:47:42] [luckperms-worker-13/WARN]: 	... 9 more
commented

@BrainStone And how would I do that with LuckPerm's formatting? I have 100,000+ user files.

I installed python and ran yamllint with it's relaxed config, it didn't fine anything wrong. Using the default config, every file is reported as not valid yaml with missing document-start and wrong indentation - finding 0 instead of expected 2. I even created a custom yamllint config to ignore document-start and use the spacing all files have, but still -- didn't find any issue.

commented

So looking at the source of the error and all the files, it seems to be the actions.json file that corrupted and cut off near the end. It also explains line 42357 in the error message since it's just a massive file logging all actions taken. I just manually removed the last command that is broken, snipped the comma, and added a closing ] bracket to close the file, no more error with any luckperms command.

I assume it's safe to delete as well since it's just a log.

commented

Run your YAML files through a linter. We cannot assist you with fixing errors in your YAML files.