Experiment_MCDiscordReserializer causing minecraft names to be escaped twice
Opened this issue · 8 comments
@Vankka Yes the names are being escaped properly with this build, but now Discord to Minecraft is broken :/
[22:28:36 ERROR]: [DiscordSRV] [JDA] One of the EventListeners had an uncaught exception
java.lang.NoSuchMethodError: github.scarsz.discordsrv.dependencies.me.vankka.simpleast.core.parser.Parser.parse(Ljava/lang/CharSequence;Ljava/util/List;Z)Ljava/util/List;
at github.scarsz.discordsrv.dependencies.me.vankka.reserializer.minecraft.MinecraftSerializer.serialize(MinecraftSerializer.java:72)
at github.scarsz.discordsrv.dependencies.me.vankka.reserializer.minecraft.MinecraftSerializer.serialize(MinecraftSerializer.java:59)
at github.scarsz.discordsrv.DiscordSRV.broadcastMessageToMinecraftServer(DiscordSRV.java:834)
at github.scarsz.discordsrv.listeners.DiscordChatListener.onGuildMessageReceived(DiscordChatListener.java:202)
at github.scarsz.discordsrv.dependencies.jda.core.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:381)
at github.scarsz.discordsrv.dependencies.jda.core.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:84)
at github.scarsz.discordsrv.dependencies.jda.core.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:96)
at github.scarsz.discordsrv.dependencies.jda.core.handle.SocketHandler.handle(SocketHandler.java:37)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.onDispatch(WebSocketClient.java:868)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.onEvent(WebSocketClient.java:766)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:745)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:903)
at github.scarsz.discordsrv.dependencies.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.main(ReadingThread.java:108)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at github.scarsz.discordsrv.dependencies.ws.client.WebSocketThread.run(WebSocketThread.java:45)
Try with, https://cdn.discordapp.com/attachments/393152728043487243/604624471395139625/DiscordSRV-Build-1.17.2-SNAPSHOT.jar (new jar with same name)
Discord to Minecraft works only if the message has no formatting. Otherwise, first formatted message caused this error:
[22:03:40 ERROR]: [DiscordSRV] [JDA] One of the EventListeners had an uncaught exception
java.lang.NoSuchMethodError: github.scarsz.discordsrv.dependencies.me.vankka.simpleast.core.TextStyle.values()[Lgithub/scarsz/discordsrv/dependencies/me/vankka/simpleast/core/TextStyle;
at github.scarsz.discordsrv.dependencies.me.vankka.reserializer.minecraft.MinecraftSerializer$2.<clinit>(MinecraftSerializer.java:141)
at github.scarsz.discordsrv.dependencies.me.vankka.reserializer.minecraft.MinecraftSerializer.process(MinecraftSerializer.java:141)
at github.scarsz.discordsrv.dependencies.me.vankka.reserializer.minecraft.MinecraftSerializer.serialize(MinecraftSerializer.java:124)
at github.scarsz.discordsrv.dependencies.me.vankka.reserializer.minecraft.MinecraftSerializer.serialize(MinecraftSerializer.java:109)
at github.scarsz.discordsrv.DiscordSRV.broadcastMessageToMinecraftServer(DiscordSRV.java:843)
at github.scarsz.discordsrv.listeners.DiscordChatListener.onGuildMessageReceived(DiscordChatListener.java:202)
at github.scarsz.discordsrv.dependencies.jda.core.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:381)
at github.scarsz.discordsrv.dependencies.jda.core.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:84)
at github.scarsz.discordsrv.dependencies.jda.core.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:96)
at github.scarsz.discordsrv.dependencies.jda.core.handle.SocketHandler.handle(SocketHandler.java:37)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.onDispatch(WebSocketClient.java:868)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.onEvent(WebSocketClient.java:766)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:745)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:903)
at github.scarsz.discordsrv.dependencies.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.main(ReadingThread.java:108)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at github.scarsz.discordsrv.dependencies.ws.client.WebSocketThread.run(WebSocketThread.java:45)
and the rest afterwards cause this error:
[22:04:51 ERROR]: [DiscordSRV] [JDA] One of the EventListeners had an uncaught exception
java.lang.NoClassDefFoundError: Could not initialize class github.scarsz.discordsrv.dependencies.me.vankka.reserializer.minecraft.MinecraftSerializer$2
at github.scarsz.discordsrv.dependencies.me.vankka.reserializer.minecraft.MinecraftSerializer.process(MinecraftSerializer.java:141)
at github.scarsz.discordsrv.dependencies.me.vankka.reserializer.minecraft.MinecraftSerializer.serialize(MinecraftSerializer.java:124)
at github.scarsz.discordsrv.dependencies.me.vankka.reserializer.minecraft.MinecraftSerializer.serialize(MinecraftSerializer.java:109)
at github.scarsz.discordsrv.DiscordSRV.broadcastMessageToMinecraftServer(DiscordSRV.java:843)
at github.scarsz.discordsrv.listeners.DiscordChatListener.onGuildMessageReceived(DiscordChatListener.java:202)
at github.scarsz.discordsrv.dependencies.jda.core.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:381)
at github.scarsz.discordsrv.dependencies.jda.core.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:84)
at github.scarsz.discordsrv.dependencies.jda.core.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:96)
at github.scarsz.discordsrv.dependencies.jda.core.handle.SocketHandler.handle(SocketHandler.java:37)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.onDispatch(WebSocketClient.java:868)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.onEvent(WebSocketClient.java:766)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:745)
at github.scarsz.discordsrv.dependencies.jda.core.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:903)
at github.scarsz.discordsrv.dependencies.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.main(ReadingThread.java:108)
at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at github.scarsz.discordsrv.dependencies.ws.client.WebSocketThread.run(WebSocketThread.java:45)
@Vankka, with that build, Discord messages still don't show in Minecraft, but nothing is logged to console this time, not even the Discord messages(oops, screen was in copy mode.) Every Discord message causes an infinite loop:
[08:06:08] [Log4j2-TF-1-AsyncLogger[AsyncContext@1b6d3586]-1/ERROR]: [DiscordSRV] [JDA] One of the EventListeners had an uncaught exception
java.lang.StackOverflowError
at github.scarsz.discordsrv.dependencies.me.vankka.simpleast.core.parser.Parser.parse(Parser.java:43)
[last line repeated 1023 more times]
4th time now sigh, sorry about the extra trouble & wait. This should work, I tested it this time :/