CustomCrafting icon indicating copy to clipboard operation
CustomCrafting copied to clipboard

ProtocolLib compatibility creates a massive error upon joining.

Open Pixelcraftian opened this issue 1 year ago • 4 comments

What happened?

ProtocolLib and CustomCrafting being on the same server is not friendly to people joining. Spits out a massive error whenever somebody joins. Doesn't happen on disconnect. Both configs have not been modified to my knowledge.

(There is a closed issue along these lines but it's a different error and there was no outcome)

How can the bug be reproduced?

Have the plugins installed on the same server and join.

Expected Behaviour?

This error should not appear.

Plugin version

CC 4.17-beta.5, WS 4.17.0.0 - PL 5.4.0-SNAPSHOT-738

Server software

Paper 1.21.3

Relevant log output

[00:34:48 ERROR]: [CustomCrafting] Unhandled exception occurred in onPacketSending(PacketEvent) for CustomCrafting
com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0
        at ProtocolLib (1).jar/com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.reflect.StructureModifier.read(StructureModifier.java:247) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.reflect.StructureModifier.modify(StructureModifier.java:349) ~[ProtocolLib (1).jar:?]
        at customcrafting-spigot-4.17-beta.5.jar/me.wolfyscript.customcrafting.compatibility.protocollib.ProtocolLib$2.onPacketSending(ProtocolLib.java:104) ~[customcrafting-spigot-4.17-beta.5.jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.collection.OutboundPacketListenerSet.invokeListener(OutboundPacketListenerSet.java:74) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.collection.PacketListenerSet.lambda$invoke$0(PacketListenerSet.java:123) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.timing.TimingTracker.lambda$static$0(TimingTracker.java:7) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.collection.PacketListenerSet.invoke(PacketListenerSet.java:123) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.collection.OutboundPacketListenerSet.invoke(OutboundPacketListenerSet.java:30) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.collection.PacketListenerSet.invoke(PacketListenerSet.java:102) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:528) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.PacketFilterManager.invokeOutboundPacketListeners(PacketFilterManager.java:516) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:528) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.proxyRunnable(NettyEventLoopProxy.java:44) ~[ProtocolLib (1).jar:?]
        at ProtocolLib (1).jar/com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:233) ~[ProtocolLib (1).jar:?]
        at net.minecraft.network.Connection.sendPacket(Connection.java:497) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.network.Connection.send(Connection.java:457) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.network.ServerCommonPacketListenerImpl.send(ServerCommonPacketListenerImpl.java:320) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.network.ServerCommonPacketListenerImpl.send(ServerCommonPacketListenerImpl.java:301) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.players.PlayerList.placeNewPlayer(PlayerList.java:306) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.network.ServerConfigurationPacketListenerImpl.handleConfigurationFinished(ServerConfigurationPacketListenerImpl.java:173) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.network.protocol.configuration.ServerboundFinishConfigurationPacket.handle(ServerboundFinishConfigurationPacket.java:22) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.network.protocol.configuration.ServerboundFinishConfigurationPacket.handle(ServerboundFinishConfigurationPacket.java:13) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:55) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:154) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1578) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:207) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:128) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1555) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1548) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:138) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1499) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1509) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1345) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:340) ~[paper-1.21.3.jar:1.21.3-81-da71382]
        at java.base/java.lang.Thread.run(Unknown Source) ~[?:?]
[00:34:48 ERROR]: Parameters: 
  net.minecraft.network.protocol.game.ClientboundUpdateRecipesPacket@4801e082[
    itemSets={ResourceKey[minecraft:recipe_property_set / minecraft:smoker_input]=net.minecraft.world.item.crafting.RecipePropertySet@6e3bfdd6, ResourceKey[minecraft:recipe_property_set / minecraft:blast_furnace_input]=net.minecraft.world.item.crafting.RecipePropertySet@e49ebe0, ResourceKey[minecraft:recipe_property_set / minecraft:smithing_addition]=net.minecraft.world.item.crafting.RecipePropertySet@69838706, ResourceKey[minecraft:recipe_property_set / minecraft:smithing_base]=net.minecraft.world.item.crafting.RecipePropertySet@6dec3bf1, ResourceKey[minecraft:recipe_property_set / minecraft:smithing_template]=net.minecraft.world.item.crafting.RecipePropertySet@5c88b8fb, ResourceKey[minecraft:recipe_property_set / minecraft:campfire_input]=net.minecraft.world.item.crafting.RecipePropertySet@1d5f465b, ResourceKey[minecraft:recipe_property_set / minecraft:furnace_input]=net.minecraft.world.item.crafting.RecipePropertySet@5a3bda10}
    stonecutterRecipes=SingleInputSet[entries=[SingleInputEntry[input=net.minecraft.world.item.crafting.Ingredient@e0969f3, recipe=SelectableRecipe[optionDisplay=ItemStackSlotDisplay[stack=1 minecraft:deepslate_tile_stairs], recipe=Optional[ResourceKey[minecraft:recipe / minecraft:deepslate_tile_stairs_from_cobbled_deepslate_stonecutting]]]], SingleInputEntry[input=net.minecraft.world.item.crafting.Ingredient@1be0d510, recipe=SelectableRecipe[optionDisplay=ItemStackSlotDisplay[stack=2 minecraft:cut_red_sandstone_slab], recipe=Optional[ResourceKey[minecraft:recipe / minecraft:cut_red_sandstone_slab_from_red_sandstone_stonecutting]]]], SingleInputEntry[input=net.minecraft.world.item.crafting.Ingredient@2bad700a, recipe=SelectableRecipe[optionDisplay=ItemStackSlotDisplay[stack=2 minecraft:sandstone_slab], recipe=Optional[ResourceKey[minecraft:recipe / minecraft:sandstone_slab_from_sandstone_stonecutting]]]], SingleInputEntry[input=net.minecraft.world.item.crafting.Ingredient@5bf78d58, recipe=SelectableRecipe[optionDisplay=ItemStackSlotDisplay[stack=1 minecraft:red_sandstone_wall], recipe=Optional[ResourceKey[minecraft:recipe / minecraft:red_sandstone_wall_from_red_sandstone_stonecutting]]]], SingleInputEntry[input=net.minecraft.world.item.crafting.Ingredient@37a5991, recipe=SelectableRecipe[optionDisplay=ItemStackSlotDisplay[stack=1 minecraft:deepslate_bricks], recipe=Optional[ResourceKey[minecraft:recipe / minecraft:deepslate_bricks_from_cobbled_deepslate_stonecutting]]]], 

... (COMMENT WAYYY TOO LONG)

SingleInputEntry[input=net.minecraft.world.item.crafting.Ingredient@2a92cb4b, recipe=SelectableRecipe[optionDisplay=ItemStackSlotDisplay[stack=1 minecraft:chiseled_quartz_block], recipe=Optional[ResourceKey[minecraft:recipe / minecraft:chiseled_quartz_block_from_quartz_block_stonecutting]]]]]]
  ]

Submit issue

  • [X] read the Wiki and especially the FaQ, and made sure there is no fix to your issue,
  • [X] searched for and ensured there isn't already an open issue regarding this,
  • [X] are running the latest version of your server software (Spigot, Paper, etc.), and plugins (WolfyUtilities, CustomCrafting).

Pixelcraftian avatar Dec 10 '24 00:12 Pixelcraftian

Hello, I've made an unofficial release where this issue is fixed. You can find both CC and WolfyUtils on these links: https://github.com/AureusDevelopment/CustomCrafting/releases/tag/4.18-petu https://github.com/AureusDevelopment/WolfyUtils-Spigot/releases/tag/4.18-petu

petulikan1 avatar Dec 18 '24 14:12 petulikan1

I just got this issue as well, but it happened due to a player leaving, a moment after their UUID was saved. Using 1.21.4 purpur, plugin version is 4.16.11

1ByteBit avatar Jan 03 '25 19:01 1ByteBit

https://github.com/dmulloy2/ProtocolLib/issues/3341

Atticuss26 avatar Mar 29 '25 16:03 Atticuss26

I'm still having this issue, it seems there has been an update in ProtocolLib that had no documentation.

Atticuss26 avatar Mar 29 '25 16:03 Atticuss26