
Exception caught during firing event: Empty ItemStack not allowed
Closed this issue 路 27 comments
Modpack Version
1.22
Describe your issue.
Today I installed an Enigmatica 10 1.22 server. After a few hours of playing, when I tried to reconnect I got kicked out of the server for "Invalid player data". Eventually this affected every player who reconnected to the server.
I downgraded the server to 1.20 thinking this was a beta issue and the same problem hit the players. Restarting the server allowed users to reconnect.
I found this error mentioned in the Discord support but there was no resolution.
Crash Report
No response
Latest Log
https://gist.github.com/qhstone/51653f3489075068c7511c7f11143a15
Have you modified the modpack?
No
User Modifications
No response
Did the issue happen in singleplayer or on a server?
Server
Discord Username
QuintinStone#8913
Thanks for the report!
@MuteTiefling @Darkere
Can either of you decipher which itemstack/mod is at fault here? 馃槵
I'm guessing the culprit is among these updates mods: https://github.com/EnigmaticaModpacks/Enigmatica10/blob/master/changelogs/changelog_mods_1.22.0.md
As an addition to this: We've had this happen on our 1.20 server as well, and I initially thought it was due to an out of disk space condition, but that might not have been the case after all?
Kinda looks like it's when ftb quests is syncing down to the player... I'm not seeing any missing/broken items in the quests though. At least not related to the mods changed in the change log.
I'll keep looking through them though. Haven't been through every quest.
I found this in my latest.log while searching for the issue, perhaps it's related?
[31mar.2025 18:58:56.062] [Thread-33/ERROR] [toomanyrecipeviewers/]: Failed to add JEI recipe manager plugins due to being unsupported by TooManyRecipeViewers: [dev.ftb.mods.ftbxmodcompat.ftbquests.jei.QuestRecipeManagerPlugin, dev.ftb.mods.ftbxmodcompat.ftbquests.jei.LootCrateRecipeManagerPlugin, mezz.jei.library.load.registration.TypedRecipeManagerPluginAdapter]
java.lang.UnsupportedOperationException: null
at TRANSFORMER/[email protected]+jei.19.21.0.247/dev.nolij.toomanyrecipeviewers.impl.api.recipe.RecipeManager.addPlugins(RecipeManager.java:555) ~[toomanyrecipeviewers-0.3.3+jei.19.21.0.247.jar%23748!/:?]
at TRANSFORMER/[email protected]+jei.19.21.0.247/dev.nolij.toomanyrecipeviewers.EMIPlugin.createRecipeManager(EMIPlugin.java:200) ~[toomanyrecipeviewers-0.3.3+jei.19.21.0.247.jar%23748!/:?]
at TRANSFORMER/[email protected]+jei.19.21.0.247/dev.nolij.toomanyrecipeviewers.EMIPlugin.register(EMIPlugin.java:86) ~[toomanyrecipeviewers-0.3.3+jei.19.21.0.247.jar%23748!/:?]
at TRANSFORMER/[email protected]+1.21.1+neoforge/dev.emi.emi.runtime.EmiReloadManager$ReloadWorker.run(EmiReloadManager.java:188) ~[emi-1.1.21+1.21.1+neoforge.jar%23564!/:?]
at java.base/java.lang.Thread.run(Unknown Source) [?:?]
@MaxNeedsSnacks hey \o does this issue look familiar to you?
Unsure, I haven鈥榯 really actively been part of the FTB dev team for a while so this is more @desht鈥榮 domain ^^;
This is because of this: https://github.com/Nolij/TooManyRecipeViewers/blob/master/README.md#recipe-manager-plugins
JEI recipe manager plugins aren't supported by TMRV. Seems unlikely that would lead that "Empty Itemstack not allowed" error though? I would expect TMRV to just warn and continue on its way if it encounters recipe manager plugins...
Contribute to Nolij/TooManyRecipeViewers development by creating an account on GitHub.
Regarding the stack trace, this is the relevant bit:
io.netty.handler.codec.EncoderException: Empty ItemStack not allowed
at TRANSFORMER/[email protected]/net.minecraft.world.item.ItemStack$2.encode(ItemStack.java:167)
at TRANSFORMER/[email protected]/net.minecraft.world.item.ItemStack$2.encode(ItemStack.java:155)
at TRANSFORMER/[email protected]/net.minecraft.network.codec.ByteBufCodecs$21.encode(ByteBufCodecs.java:374)
at TRANSFORMER/[email protected]/net.minecraft.network.codec.ByteBufCodecs$21.encode(ByteBufCodecs.java:358)
at TRANSFORMER/[email protected]/net.minecraft.network.codec.StreamCodec$4.encode(StreamCodec.java:81)
at TRANSFORMER/[email protected]/net.minecraft.core.component.DataComponentPatch$1.encodeComponent(DataComponentPatch.java:127)
at TRANSFORMER/[email protected]/net.minecraft.core.component.DataComponentPatch$1.encode(DataComponentPatch.java:111)
at TRANSFORMER/[email protected]/net.minecraft.core.component.DataComponentPatch$1.encode(DataComponentPatch.java:58)
at TRANSFORMER/[email protected]/net.minecraft.world.item.ItemStack$1.encode(ItemStack.java:151)
at TRANSFORMER/[email protected]/net.minecraft.world.item.ItemStack$1.encode(ItemStack.java:131)
at TRANSFORMER/[email protected]/dev.ftb.mods.ftbquests.quest.reward.ItemReward.writeNetData(ItemReward.java:104)
Empty items are in fact allowed in rewards (we encode with ItemStack.OPTIONAL_STREAM_CODEC.encode(buffer, item);
), but that's not the actual problem. Whatever item is being encoded has a data component with an empty itemstack in it, and that data component is what's choking on the empty item. So it's some item in a quest reward that can contain an item (that shouldn't be empty, but is) in its component data...
Unfortunately I don't think there's much more to go on, but that might narrow it down a little.
Hrm...maybe the akashic tome. It's the only thing I can think of with nbt that I didn't check.
Morph o tool also doesn't appear to have any issues. The items contained within are all still valid.
@desht, do you think it'd be possible to log out the problematic item? Since it seems like it's the component data at fault and not the main item itself, if we could log out the actual item that might help us figure this out.
Otherwise I'm at a loss here, there really aren't that many quest items with components and I can't see any issues with any of them at this point.
Yeah, I could catch the exception and dump the item, might provide some useful data. Will update you tomorrow, should be able to get a dev build together...
Can you give https://maven.ftb.dev/snapshots/dev/ftb/mods/ftb-quests-neoforge/2101.1.9-SNAPSHOT/ftb-quests-neoforge-2101.1.9-20250403.074933-1.jar a go and see what it logs? It should log some informative errors when the item of interest gets sync'd, on player login.
I've also set it to instead sync the default "missing item" that FTBQ uses when an item is unknown (the purple "?" item you may have seen before...) when this EncoderException
is caught.
Nice, thanks. I can confirm that launches without issues, but I'm not seeing any errors from it in my dev instance. That's not exactly unexpected though since I'm Single Player and wasn't getting any crashing in the first place.
@qhstone Would you be averse to replacing FTB quests with the one from the link above on both client and server? Then see if the error persists and provide your logs as before.
I can confirm this is happening on our multi-player server as well, same log error.
at TRANSFORMER/[email protected]/net.minecraft.world.item.ItemStack$1.encode(ItemStack.java:131) ~[server-1.21.1-20240808.144430-srg.jar%23401!/:?]
at TRANSFORMER/[email protected]/dev.ftb.mods.ftbquests.quest.reward.ItemReward.writeNetData(ItemReward.java:104) ~[ftb-quests-neoforge-2101.1.6.jar%23521!/:2101.1.6]
at TRANSFORMER/[email protected]/dev.ftb.mods.ftbquests.quest.BaseQuestFile.lambda$writeNetDataFull$21(BaseQuestFile.java:963) ~[ftb-quests-neoforge-2101.1.6.jar%23521!/:2101.1.6]
I can confirm this is happening on our multi-player server as well, same log error.
at TRANSFORMER/[email protected]/net.minecraft.world.item.ItemStack$1.encode(ItemStack.java:131) ~[server-1.21.1-20240808.144430-srg.jar%23401!/:?] at TRANSFORMER/[email protected]/dev.ftb.mods.ftbquests.quest.reward.ItemReward.writeNetData(ItemReward.java:104) ~[ftb-quests-neoforge-2101.1.6.jar%23521!/:2101.1.6] at TRANSFORMER/[email protected]/dev.ftb.mods.ftbquests.quest.BaseQuestFile.lambda$writeNetDataFull$21(BaseQuestFile.java:963) ~[ftb-quests-neoforge-2101.1.6.jar%23521!/:2101.1.6]
Would you mind trying this version of FTB Quest, on both server and client? 馃槉
#413 (comment)
It won't fix the issue, but it should allow print which item is the culprit in your logs.
Would you mind trying this version of FTB Quest, on both server and client? 馃槉
#413 (comment)
It won't fix the issue, but it should allow print which item is the culprit in your logs.
we'll do some testing tonight and see what we can grab from the logs for you.
...see below :) #413 (comment)
fresh start up - you mentioned it wouldn't fix the issue, but it allowed me to log in just fine.
Only notable bit I see is this:
[10Apr2025 01:45:34.083] [Server thread/INFO] [evilcraft/]: Loading infobook /data/evilcraft/info/book.xml [10Apr2025 01:45:34.097] [Server thread/WARN] [evilcraft/]: Invalid appendix info_book.evilcraft.second_age.tools.broom from mod evilcraft in an infobook: The broom modifier evilcraft:witherer has no valid items [10Apr2025 01:45:34.098] [Server thread/WARN] [evilcraft/]: Invalid appendix info_book.evilcraft.second_age.tools.broom from mod evilcraft in an infobook: The broom modifier evilcraft:hungerer has no valid items [10Apr2025 01:45:34.098] [Server thread/WARN] [evilcraft/]: Invalid appendix info_book.evilcraft.second_age.tools.broom from mod evilcraft in an infobook: The broom modifier evilcraft:kamikaze has no valid items [10Apr2025 01:45:34.098] [Server thread/WARN] [evilcraft/]: Invalid appendix info_book.evilcraft.second_age.tools.broom from mod evilcraft in an infobook: The broom modifier evilcraft:withershield has no valid items
Yeah, I'd expect the update to allow login to happen - it catches the EncoderException
that was causing a player kick, and syncs an "invalid item" placeholder item to the client instead.
What's surprising is that no error messages were logged - I'd expect to see errors in the log from this code here: https://github.com/FTBTeam/FTB-Quests/blob/dev/common/src/main/java/dev/ftb/mods/ftbquests/quest/reward/ItemReward.java#L110-L115
Quests is one of the best Questing mods for Minecraft out there. It has a highly customisable questing system and an easy to use interface. - FTBTeam/FTB-Quests
Yeah, I'd expect the update to allow login to happen - it catches the
EncoderException
that was causing a player kick, and syncs an "invalid item" placeholder item to the client instead.What's surprising is that no error messages were logged - I'd expect to see errors in the log from this code here: https://github.com/FTBTeam/FTB-Quests/blob/dev/common/src/main/java/dev/ftb/mods/ftbquests/quest/reward/ItemReward.java#L110-L115
GitHub**FTB-Quests/common/src/main/java/dev/ftb/mods/ftbquests/quest/reward/ItemReward.java at dev 路 FTBTeam/FTB-Quests**Quests is one of the best Questing mods for Minecraft out there. It has a highly customisable questing system and an easy to use interface. - FTBTeam/FTB-Quests
@desht Any chance you can release this version? Would be nice with a fix, regardless of how it's made 馃槉
Quests is one of the best Questing mods for Minecraft out there. It has a highly customisable questing system and an easy to use interface. - FTBTeam/FTB-Quests
Quests is one of the best Questing mods for Minecraft out there. It has a highly customisable questing system and an easy to use interface. - FTBTeam/FTB-Quests