Floodgate icon indicating copy to clipboard operation
Floodgate copied to clipboard

Error when receiving cumulus forms JsonArray#deepCopy()

Open Ansandr opened this issue 2 years ago • 3 comments

Describe the bug

I have a Bungeecord and Spigot servers with Floodgate installed on. When I send cumulus forms to player and trying to get a response the following exception is thrown.

The form shows correct but response cause the exception

[15:29:40 WARN]: [floodgate] Plugin floodgate v2.2.0-SNAPSHOT (b69-a46f43d) generated an exception whilst handling plugin message java.lang.IllegalAccessError: class org.geysermc.cumulus.form.impl.custom.CustomFormCodec tried to access method 'com.google.gson.JsonArray com.google.gson.JsonArray.deepCopy()' (org.geysermc.cumulus.form.impl.custom.CustomFormCodec is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @3384bce9; com.google.gson.JsonArray is in unnamed module of loader 'app') at org.geysermc.cumulus.form.impl.custom.CustomFormCodec.deserializeResponse(CustomFormCodec.java:100) ~[?:?] at org.geysermc.cumulus.form.impl.custom.CustomFormCodec.deserializeResponse(CustomFormCodec.java:54) ~[?:?] at org.geysermc.cumulus.form.util.impl.FormCodecImpl.deserializeFormResponse(FormCodecImpl.java:122) ~[?:?] at org.geysermc.cumulus.util.glue.FormGlue.deserializeResponse(FormGlue.java:74) ~[?:?] at org.geysermc.cumulus.util.glue.CustomFormGlue.parseResponse(CustomFormGlue.java:63) ~[?:?] at me.ansandr.auth.FormManager.lambda$sendLoginForm$2(FormManager.java:59) ~[?:?] at org.geysermc.cumulus.util.glue.CustomFormGlue$Builder.lambda$build$0(CustomFormGlue.java:288) ~[?:?] at org.geysermc.cumulus.form.impl.FormImpl.callRawResponseConsumer(FormImpl.java:56) ~[?:?] at org.geysermc.cumulus.form.impl.FormDefinition.callRawResponseConsumer(FormDefinition.java:69) ~[?:?] at org.geysermc.cumulus.form.impl.FormDefinition.handleFormResponse(FormDefinition.java:60) ~[?:?] at org.geysermc.floodgate.pluginmessage.channel.FormChannel.callResponseConsumer(FormChannel.java:130) ~[?:?] at org.geysermc.floodgate.pluginmessage.channel.FormChannel.handleServerCall(FormChannel.java:93) ~[?:?] at org.geysermc.floodgate.pluginmessage.SpigotPluginMessageRegistration.lambda$register$0(SpigotPluginMessageRegistration.java:44) ~[?:?] at org.bukkit.plugin.messaging.StandardMessenger.dispatchIncomingMessage(StandardMessenger.java:426) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:2760) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.PacketPlayInCustomPayload.a(SourceFile:58) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.PacketPlayInCustomPayload.a(SourceFile:8) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) ~[patched_1.12.2.jar:git-Paper-1618] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:850) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666) ~[patched_1.12.2.jar:git-Paper-1618]

Ansandr avatar Jun 16 '22 13:06 Ansandr

Can you send a dump?

Tim203 avatar Jun 18 '22 09:06 Tim203

Oh yes Bungee dump: https://dump.geysermc.org/vWtIHnKJOvNIydHejkp506PsroMAU6v2 Bungee logs: https://www.toptal.com/developers/hastebin/udinodopif.md

Spigot dump: https://dump.geysermc.org/NXCWJEEKF6kl3FXSy3XVd8TDxeaIb5TI Spigot logs: https://www.toptal.com/developers/hastebin/zasixuguqi.sql

I also uploaded Geyser to the Spigot server to make a dump

Ansandr avatar Jun 19 '22 10:06 Ansandr

deepCopy() has only been public since gson 2.8.2

The server jar only moved to 2.8.2 between 1.17.1 and 1.18

Konicai avatar Jul 10 '22 15:07 Konicai

This has been fixed since master build 73

Tim203 avatar Aug 30 '22 14:08 Tim203