Closed SirvydasS closed 3 years ago
Please, could you upload at least one challenge ... it would be excellent if you could add also challenge data before the update and after update to 1.15.2 if it is possible.
@Poslovitch I suspect this relates to JSON item parser (as all icons are stored as ItemStacks in the database).
BEFORE
{
"uniqueId": "BSkyBlock_alchemist",
"friendlyName": "Alchemistas",
"deployed": true,
"description": [
"Brew some potions"
],
"icon": "is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: BREWING_STAND\n",
"order": 1,
"challengeType": "INVENTORY",
"environment": [],
"removeWhenCompleted": false,
"level": "BSkyBlock_advanced",
"requiredPermissions": [],
"requiredBlocks": {},
"removeBlocks": false,
"requiredEntities": {},
"removeEntities": false,
"requiredItems": [
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:healing\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:water_breathing\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:swiftness\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:fire_resistance\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:leaping\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:night_vision\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:invisibility\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:slow_falling\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:strength\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:regeneration\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:poison\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:weakness\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:harming\n",
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: POTION\n meta:\n ==: ItemMeta\n meta-type: POTION\n potion-type: minecraft:slowness\n"
],
"takeItems": true,
"requiredExperience": 0,
"takeExperience": false,
"requiredMoney": 0,
"takeMoney": false,
"requiredIslandLevel": 0,
"searchRadius": 10,
"rewardText": "Deimantų niekad nebus per daug!",
"rewardItems": [
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: DIAMOND_ORE\n amount: 4\n"
],
"rewardExperience": 50,
"rewardMoney": 0,
"rewardCommands": [],
"repeatable": true,
"repeatRewardText": "",
"maxTimes": 3,
"repeatExperienceReward": 5,
"repeatItemReward": [
"is:\n ==: org.bukkit.inventory.ItemStack\n v: 1976\n type: DIAMOND_ORE\n"
],
"repeatMoneyReward": 0,
"repeatRewardCommands": []
}
AFTER
{
"uniqueId": "BSkyBlock_alchemist",
"friendlyName": "Alchemistas(-ė)",
"deployed": true,
"description": [
"Išvirk keletą eleksyrų."
],
"icon": "is:\n ==: org.bukkit.inventory.ItemStack\n v: 2230\n type: PAPER\n",
"order": 1,
"challengeType": "INVENTORY",
"environment": [],
"removeWhenCompleted": false,
"level": "BSkyBlock_advanced",
"requirements": {
"class": "InventoryRequirements",
"parameters": {
"requiredItems": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
],
"takeItems": true,
"requiredPermissions": []
}
},
"requiredPermissions": [],
"requiredBlocks": {},
"removeBlocks": false,
"requiredEntities": {},
"removeEntities": false,
"requiredItems": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
],
"takeItems": true,
"requiredExperience": 0,
"takeExperience": false,
"requiredMoney": 0,
"takeMoney": false,
"requiredIslandLevel": 0,
"searchRadius": 10,
"rewardText": "Deimantų niekada nebus per daug!",
"rewardItems": [
null
],
"rewardExperience": 50,
"rewardMoney": 0,
"rewardCommands": [],
"repeatable": true,
"repeatRewardText": "",
"maxTimes": 3,
"repeatExperienceReward": 5,
"repeatItemReward": [
null
],
"repeatMoneyReward": 0,
"repeatRewardCommands": []
}
Yes, all itemStacks have become null. That's not good. Let's investigate.
Hmm, I cannot replicate this. I made a server using 1.15 and created challenges. I then upgraded to the latest Paper 1.15.2 build (65) and it all works fine. I also tested other ItemStack dependent addons like InvSwitcher and it upgraded fine too, so I am not sure why this happened. @SirvydasS What server version did you upgrade from and to? I see "PAPER Netinkama" but i don't know what that is.
Netimkana is most likely a translation for "Invalid". That bit of text is localized if the version/server software is unknown.
Okay. Understood. Yes, mine says "Invalid" right now too. Anyway, the question still remains: Which version/Build from and which Build too?
Hmm, interesting.
From
git-Paper-58 (MC: 1.15.1) (Implementing API version 1.15.1-R0.1-SNAPSHOT)
To
git-Paper-65 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
So, I have seen the same issue with NULL conversion when was upgrading from 1.14.3 to 1.14.4 but I could not replicate it. Also now, I cannot replicate. Can you try to put challenges database backup again and check if it works the same (with error) or it randomly starts to work....
Yeah, I will try after a few hours. Sadly backup is only 2019-10-23, because I have a little changing in a messages and interesting how works bentobox backup system.
I tried... and know getting error when writing /is challenges before I was making JSON mistake I forgot to put quotes and commas but I fixed and getting this
[22:30:53 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'is challenges' in world.bentobox.bskyblock.commands.IslandCommand(island)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:169) ~[patched_1.15.2.jar:git-Paper-65]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:740) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1820) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1628) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1038) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1031) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1015) ~[patched_1.15.2.jar:git-Paper-65]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:938) ~[patched_1.15.2.jar:git-Paper-65]
at java.lang.Thread.run(Thread.java:835) [?:?]
Caused by: java.lang.NullPointerException
at world.bentobox.challenges.panel.CommonGUI.getInventoryRequirements(CommonGUI.java:716) ~[?:?]
at world.bentobox.challenges.panel.CommonGUI.lambda$generateChallengeDescription$4(CommonGUI.java:492) ~[?:?]
at java.util.ArrayList.forEach(ArrayList.java:1540) ~[?:?]
at world.bentobox.challenges.panel.CommonGUI.generateChallengeDescription(CommonGUI.java:355) ~[?:?]
at world.bentobox.challenges.panel.user.ChallengesGUI.getChallengeButton(ChallengesGUI.java:370) ~[?:?]
at world.bentobox.challenges.panel.user.ChallengesGUI.addFreeChallenges(ChallengesGUI.java:210) ~[?:?]
at world.bentobox.challenges.panel.user.ChallengesGUI.build(ChallengesGUI.java:95) ~[?:?]
at world.bentobox.challenges.commands.ChallengesCommand.execute(ChallengesCommand.java:77) ~[?:?]
at world.bentobox.bentobox.api.commands.CompositeCommand.call(CompositeCommand.java:260) ~[?:?]
at world.bentobox.bentobox.api.commands.CompositeCommand.execute(CompositeCommand.java:233) ~[?:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.15.2.jar:git-Paper-65]
... 16 more
loaded defaults new challenges and everything is OK.
Could you share all your challenges and levels? (from backup)
backup.zip I made a little mistake and I didn't make a copy of the backup and was changing messages before uploading to the server and is possible a was making more mistakes maybe (I did not check very well).
@tastybento Could it relate to https://github.com/BentoBoxWorld/BentoBox/pull/1141?
It could in regard to the file not being saved properly before that fix went in. Yes, what could have happened was that the object was queued to be saved, cleared async, and then saved as nulls. So, in that case, 1141 should eliminate the problem.
I'm not sure if this is the same issue. but i get the following stack trace when trying to execute /is challenges
or /bsb challenges
.
org.bukkit.command.CommandException: Unhandled exception executing 'is challenges' in world.bentobox.bskyblock.commands.IslandCommand(island)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:169) ~[patched_1.15.2.jar:git-Paper-196]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:752) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1825) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1633) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1089) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1082) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1046) ~[patched_1.15.2.jar:git-Paper-196]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:962) ~[patched_1.15.2.jar:git-Paper-196]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.LinkageError: loader constraint violation: loader world.bentobox.bentobox.api.addons.AddonClassLoader @48bb4209 wants to load class world.bentobox.challenges.config.Settings. A different class with the same name was previously loaded by world.bentobox.bentobox.api.addons.AddonClassLoader @70d84dda. (world.bentobox.challenges.config.Settings is in unnamed module of loader world.bentobox.bentobox.api.addons.AddonClassLoader @70d84dda, parent loader org.bukkit.plugin.java.PluginClassLoader @5bfe1f94)
at world.bentobox.challenges.ChallengesManager.getDataUniqueID(ChallengesManager.java:967) ~[?:?]
at world.bentobox.challenges.ChallengesManager.getDataUniqueID(ChallengesManager.java:954) ~[?:?]
at world.bentobox.challenges.ChallengesManager.lambda$getAllChallengeLevelStatus$13(ChallengesManager.java:1540) ~[?:?]
at java.util.Optional.map(Optional.java:265) ~[?:?]
at world.bentobox.challenges.ChallengesManager.getAllChallengeLevelStatus(ChallengesManager.java:1538) ~[?:?]
at world.bentobox.challenges.panel.user.ChallengesGUI.<init>(ChallengesGUI.java:51) ~[?:?]
at world.bentobox.challenges.commands.ChallengesCommand.execute(ChallengesCommand.java:80) ~[?:?]
at world.bentobox.bentobox.api.commands.CompositeCommand.call(CompositeCommand.java:260) ~[?:?]
at world.bentobox.bentobox.api.commands.CompositeCommand.execute(CompositeCommand.java:233) ~[?:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.15.2.jar:git-Paper-196]
... 16 more
____________________________________________________________________________________
VERSION DATA
Running PAPER 1.15.2.
BentoBox version: 1.12.0
Database: JSON
Loaded Game Worlds:
acidisland_world (AcidIsland): Overworld, Nether, The End
bskyblock_world (BSkyBlock): Overworld, Nether, The End
caveblock-world (CaveBlock): Overworld, Nether, The End
skygrid-world (SkyGrid): Overworld, Nether, The End
Loaded Addons:
AcidIsland 1.12.0 (ENABLED)
BentoBox-InvSwitcher 0.0.4 (ENABLED)
Biomes 1.7.0 (ENABLED)
Border 1.0.7 (DISABLED)
BSkyBlock 1.12.0 (ENABLED)
CaveBlock 1.11.0 (ENABLED)
Challenges 0.8.0 (ENABLED)
Chat 1.0.4 (ENABLED)
ControlPanel 1.7.0 (ENABLED)
DimensionalTrees 1.6.0 (ENABLED)
Greenhouses 1.0.0 (ENABLED)
Level 1.9.3 (ENABLED)
Likes 1.7.0 (ENABLED)
Limits 1.9.4 (ENABLED)
MagicCobblestoneGenerator 1.7.0.2 (ENABLED)
MagicSummon 1.5.0.0 (ENABLED)
SkyGrid 1.11.2 (ENABLED)
TwerkingForTrees 1.3.0 (ENABLED)
VoidPortals 1.5.0.0 (ENABLED)
Warps 1.9.0 (ENABLED)
clean install of the addon doesn't fix, It worked one time, i'm not sure what i done, just restarted the server and it worked, then broke next restart :feelsbadman:
@hell-of-the-devil Different issue.
The error:
Caused by: java.lang.LinkageError: loader constraint violation: loader world.bentobox.bentobox.api.addons.AddonClassLoader @48bb4209 wants to load class world.bentobox.challenges.config.Settings. A different class with the same name was previously loaded by world.bentobox.bentobox.api.addons.AddonClassLoader @70d84dda. (world.bentobox.challenges.config.Settings is in unnamed module of loader world.bentobox.bentobox.api.addons.AddonClassLoader @70d84dda, parent loader org.bukkit.plugin.java.PluginClassLoader @5bfe1f94)
is caused by the addon having be loaded twice e.g., /bbox reload
or a reload was done. It shouldn't happen but if there's a reload it can happen. If it works fine as soon as you load up the server, then that's a confirmation. If it still doesn't, then file a separate bug because something is loading it twice.
@tastybento thanks for the confirmation, it obviously appears to be the issue you mentioned, for some reason when i restart the server it doesn't work, but if i /bbox reload
it does
appreciate the quick ass response, <3
p.s i just confirmed that restarting the server breaks it, and /bbox reload fixes it! i shall look into what's loading twice and will submit an issue
Probably because you have 2 challenges jar in addons folder?
Description
Describe the bug
Challanges dont work, you cant complete, you can open GUI but showing only papers and books, dont showing somehere what items need to complete missions.
Steps to reproduce the behavior
Update server version to latest paper version 1.15.2. and see /c
Expected behavior
Challanges works.
Screenshots and videos (Optional)
Environment
BentoBox Version (Mandatory)
Plugins (Optional)
Additional context (Optional)