Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception occurred in onPacketSending(PacketEvent) for ItemsAdder java.lang.UnsupportedOperationException: com.google.gson.JsonSyntaxException: Expected id to be a string, was an array ([-22...51]) #3282

Closed
5 tasks done
Farmeurimmo opened this issue Jan 3, 2024 · 5 comments
Labels
env: purpur type: bug Something isn't working type: other plugin bug This is another plugin bug. verdict: workaround implemented A workaround is implemented to mitigate the issue.
Milestone

Comments

@Farmeurimmo
Copy link

Terms

  • I'm using the very latest version of ItemsAdder and its dependencies.
  • I am sure this is a bug and it is not caused by a misconfiguration or by another plugin.
  • I already searched on this Github page to check if the same issue was already reported.
  • I already searched on the plugin wiki to know if a solution is already known.
  • I already searched on the forums to check if anyone already has a solution for this.

Discord tag (optional)

Farmeurimmo

What happened?

When opening wandering or villager inventories, I get an error in the console.

Steps to reproduce the issue

  1. Open the inventory of a wandering merchant or villager
  2. Look at console logs

Server version

image

ItemsAdder Version

image

ProtocolLib Version

image

LoneLibs Version

image

FULL server log

latest.log

Error (optional)

[15:02:10 ERROR]: [ItemsAdder] Unhandled exception occurred in onPacketSending(PacketEvent) for ItemsAdder
java.lang.UnsupportedOperationException: com.google.gson.JsonSyntaxException: Expected id to be a string, was an array ([140...38])
	at lonelibs.net.kyori.adventure.platform.bukkit.MinecraftComponentSerializer.serialize(MinecraftComponentSerializer.java:225) ~[LoneLibs.jar:?]
	at ia.m.iI.a(SourceFile:97) ~[ItemsAdder_3.6.3-beta-5.jar:?]
	at ia.m.hy.onPacketSending(SourceFile:173) ~[ItemsAdder_3.6.3-beta-5.jar:?]
	at com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:219) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.SortedPacketListenerList.invokeUnpackedPacketSending(SortedPacketListenerList.java:204) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:139) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:553) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:526) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketSending(NetworkManagerInjector.java:100) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:553) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector$2.doProxyRunnable(NettyChannelInjector.java:456) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.proxyRunnable(NettyEventLoopProxy.java:43) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:252) ~[ProtocolLib.jar:?]
	at net.minecraft.network.Connection.sendPacket(Connection.java:432) ~[?:?]
	at net.minecraft.network.Connection.send(Connection.java:392) ~[?:?]
	at net.minecraft.server.network.ServerCommonPacketListenerImpl.send(ServerCommonPacketListenerImpl.java:276) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.network.ServerCommonPacketListenerImpl.send(ServerCommonPacketListenerImpl.java:261) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.level.ServerPlayer.openMenu(ServerPlayer.java:1640) ~[?:?]
	at net.minecraft.world.item.trading.Merchant.openTradingScreen(Merchant.java:41) ~[?:?]
	at net.minecraft.world.entity.npc.Villager.startTrading(Villager.java:453) ~[?:?]
	at net.minecraft.world.entity.npc.Villager.mobInteract(Villager.java:431) ~[?:?]
	at net.minecraft.world.entity.Mob.interact(Mob.java:1374) ~[?:?]
	at net.minecraft.world.entity.player.Player.interactOn(Player.java:1174) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl$4.performInteraction(ServerGamePacketListenerImpl.java:2816) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl$4.a(ServerGamePacketListenerImpl.java:2836) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundInteractPacket$InteractionAction.dispatch(ServerboundInteractPacket.java:131) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundInteractPacket.dispatch(ServerboundInteractPacket.java:80) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleInteract(ServerGamePacketListenerImpl.java:2775) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:67) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:12) ~[?:?]
	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:53) ~[?:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1351) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:193) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1328) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1321) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1299) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1187) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: com.google.gson.JsonSyntaxException: Expected id to be a string, was an array ([140...38])
	at net.minecraft.util.GsonHelper.convertToString(GsonHelper.java:97) ~[?:?]
	at net.minecraft.util.GsonHelper.getAsString(GsonHelper.java:103) ~[?:?]
	at net.minecraft.network.chat.HoverEvent$EntityTooltipInfo.create(HoverEvent.java:177) ~[?:?]
	at net.minecraft.network.chat.HoverEvent$Action.deserialize(HoverEvent.java:136) ~[?:?]
	at net.minecraft.network.chat.HoverEvent.deserialize(HoverEvent.java:80) ~[?:?]
	at net.minecraft.network.chat.Style$Serializer.getHoverEvent(Style.java:405) ~[?:?]
	at net.minecraft.network.chat.Style$Serializer.deserialize(Style.java:377) ~[?:?]
	at net.minecraft.network.chat.Style$Serializer.deserialize(Style.java:364) ~[?:?]
	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1227) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1329) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1300) ~[gson-2.10.1.jar:?]
	at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:179) ~[gson-2.10.1.jar:?]
	at net.minecraft.network.chat.Component$Serializer.deserialize(Component.java:361) ~[?:?]
	at net.minecraft.network.chat.Component$Serializer.deserialize(Component.java:222) ~[?:?]
	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1227) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1329) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1271) ~[gson-2.10.1.jar:?]
	at net.minecraft.network.chat.Component$Serializer.fromJson(Component.java:536) ~[?:?]
	at lonelibs.net.kyori.adventure.platform.bukkit.MinecraftComponentSerializer.serialize(MinecraftComponentSerializer.java:221) ~[LoneLibs.jar:?]
	... 44 more
[15:02:10 ERROR]: Parameters: 
  net.minecraft.network.protocol.game.PacketPlayOutOpenWindow@2d1a960d[
    a=11
    b=net.minecraft.world.inventory.Containers@3a73661d
    c=translation{key='entity.minecraft.villager.farmer', args=[]}[style={hoverEvent=HoverEvent{action=<action show_entity>, value='net.minecraft.network.chat.ChatHoverable$b@8abdf856'},insertion=08629de5-8c47-4554-8ad5-1f075a194266}]
  ]

Problematic items yml configuration file (optional)

No response

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

No response

@Farmeurimmo Farmeurimmo added the type: bug Something isn't working label Jan 3, 2024
Copy link

github-actions bot commented Jan 3, 2024

Hello,
your report will be looked into as soon as possible.
Please do not bump this thread and don't post it on multiple platforms.

Thanks a lot for your patience.

@LoneDev6
Copy link
Collaborator

LoneDev6 commented Jan 3, 2024

Can you try this other JAR file?
https://lobfile.com/file/GLI8.jar
(rename it LoneLibs).
Thanks.

Duplicate of #3250

@LoneDev6 LoneDev6 added type: duplicate This issue or pull request already exists type: bug Something isn't working verdict: reintroduced after update and removed type: bug Something isn't working type: duplicate This issue or pull request already exists labels Jan 3, 2024
@LoneDev6 LoneDev6 moved this to Need answer in ItemsAdder Jan 3, 2024
@Farmeurimmo
Copy link
Author

Farmeurimmo commented Jan 3, 2024

Still getting an error with the new jar for LoneLibs.

java.lang.UnsupportedOperationException: com.google.gson.JsonSyntaxException: Expected id to be a string, was an array ([664...01])
	at lonelibs.net.kyori.adventure.platform.bukkit.MinecraftComponentSerializer.serialize(MinecraftComponentSerializer.java:225) ~[LoneLibs.jar:?]
	at ia.m.iI.a(SourceFile:97) ~[ItemsAdder_3.6.3-beta-5.jar:?]
	at ia.m.hy.onPacketSending(SourceFile:173) ~[ItemsAdder_3.6.3-beta-5.jar:?]
	at com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:219) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.SortedPacketListenerList.invokeUnpackedPacketSending(SortedPacketListenerList.java:204) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:139) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:553) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:526) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketSending(NetworkManagerInjector.java:100) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:553) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector$2.doProxyRunnable(NettyChannelInjector.java:456) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.proxyRunnable(NettyEventLoopProxy.java:43) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:252) ~[ProtocolLib.jar:?]
	at net.minecraft.network.Connection.sendPacket(Connection.java:432) ~[?:?]
	at net.minecraft.network.Connection.send(Connection.java:392) ~[?:?]
	at net.minecraft.server.network.ServerCommonPacketListenerImpl.send(ServerCommonPacketListenerImpl.java:276) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.network.ServerCommonPacketListenerImpl.send(ServerCommonPacketListenerImpl.java:261) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.level.ServerPlayer.openMenu(ServerPlayer.java:1640) ~[?:?]
	at net.minecraft.world.item.trading.Merchant.openTradingScreen(Merchant.java:41) ~[?:?]
	at net.minecraft.world.entity.npc.Villager.startTrading(Villager.java:453) ~[?:?]
	at net.minecraft.world.entity.npc.Villager.mobInteract(Villager.java:431) ~[?:?]
	at net.minecraft.world.entity.Mob.interact(Mob.java:1374) ~[?:?]
	at net.minecraft.world.entity.player.Player.interactOn(Player.java:1174) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl$4.performInteraction(ServerGamePacketListenerImpl.java:2816) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl$4.a(ServerGamePacketListenerImpl.java:2836) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundInteractPacket$InteractionAction.dispatch(ServerboundInteractPacket.java:131) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundInteractPacket.dispatch(ServerboundInteractPacket.java:80) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleInteract(ServerGamePacketListenerImpl.java:2775) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:67) ~[?:?]
	at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:12) ~[?:?]
	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:53) ~[?:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1351) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:193) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1328) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1321) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1299) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1187) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[purpur-1.20.2.jar:git-Purpur-2095]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: com.google.gson.JsonSyntaxException: Expected id to be a string, was an array ([664...01])
	at net.minecraft.util.GsonHelper.convertToString(GsonHelper.java:97) ~[?:?]
	at net.minecraft.util.GsonHelper.getAsString(GsonHelper.java:103) ~[?:?]
	at net.minecraft.network.chat.HoverEvent$EntityTooltipInfo.create(HoverEvent.java:177) ~[?:?]
	at net.minecraft.network.chat.HoverEvent$Action.deserialize(HoverEvent.java:136) ~[?:?]
	at net.minecraft.network.chat.HoverEvent.deserialize(HoverEvent.java:80) ~[?:?]
	at net.minecraft.network.chat.Style$Serializer.getHoverEvent(Style.java:405) ~[?:?]
	at net.minecraft.network.chat.Style$Serializer.deserialize(Style.java:377) ~[?:?]
	at net.minecraft.network.chat.Style$Serializer.deserialize(Style.java:364) ~[?:?]
	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1227) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1329) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1300) ~[gson-2.10.1.jar:?]
	at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:179) ~[gson-2.10.1.jar:?]
	at net.minecraft.network.chat.Component$Serializer.deserialize(Component.java:361) ~[?:?]
	at net.minecraft.network.chat.Component$Serializer.deserialize(Component.java:222) ~[?:?]
	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:76) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1227) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1329) ~[gson-2.10.1.jar:?]
	at com.google.gson.Gson.fromJson(Gson.java:1271) ~[gson-2.10.1.jar:?]
	at net.minecraft.network.chat.Component$Serializer.fromJson(Component.java:536) ~[?:?]
	at lonelibs.net.kyori.adventure.platform.bukkit.MinecraftComponentSerializer.serialize(MinecraftComponentSerializer.java:221) ~[LoneLibs.jar:?]
	... 44 more
[17:57:21 ERROR]: Parameters: 
  net.minecraft.network.protocol.game.PacketPlayOutOpenWindow@62214734[
    a=1
    b=net.minecraft.world.inventory.Containers@21573a1a
    c=translation{key='entity.minecraft.villager.farmer', args=[]}[style={hoverEvent=HoverEvent{action=<action show_entity>, value='net.minecraft.network.chat.ChatHoverable$b@70d5ba11'},insertion=27957ade-6ef7-40b9-b3d5-cf28f3df13d7}]
  ]```

@LoneDev6
Copy link
Collaborator

LoneDev6 commented Jan 3, 2024

Related to this: KyoriPowered/adventure-platform#150
I will code a workaround for that issue until Adventure developers provide me some info about that issue.

@Farmeurimmo
Copy link
Author

Thanks you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
env: purpur type: bug Something isn't working type: other plugin bug This is another plugin bug. verdict: workaround implemented A workaround is implemented to mitigate the issue.
Projects
Status: Done
Development

No branches or pull requests

2 participants