Create: Missions

Create: Missions

413k Downloads

[Fabric 1.19.2] Players get kicked when rerolling a mission

Jakub-Wilk opened this issue ยท 9 comments

commented

Describe the Bug

Whenever someone rerolls a mission, they get kicked from the server due to
Internal Exception: java.lang.NullPointerException: Cannot invoke "com.kryeit.missions.MissionType.id()" because the return value of "com.kryeit.missions.config.ConfigReader$Mission.missionType()" is null.
There is no further stack trace.

Create is version 0.5.1c, it wasn't selectable in the version dropdown

Reproduction Steps

Not sure if reproducible in a clean environment, haven't tested on a server without my modpack.

  1. Start a server
  2. Try to reroll a mission
  3. You get kicked

Expected Result

The mission gets rerolled

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Probably linux, it's not self-hosted

Mod Version

0.2.6

Create Mod Version

0.5.1d

Minecraft Version

1.19.2

ModLoader and Version

Fabric 0.15.7

Other Mods

There's over 100, I can paste the list upon request if it's needed but I won't do it right now to not make this too long.

Additional Context

No response

commented

no need to paste the modlist, it's definetly our issue. We will seek to fix this soon. Thanks!

commented

Is the exception the text visible on the disconnect screen or is it taken from a log? If it's from a log please provide the entire log

commented

@MrRedRhino it's from the server log, but there is literally nothing else there besides the usual messages when a player disconnects. There is, however, a new issue, possibly related:

Sometimes when players attempt joining, they get immediately disconnected and the server log reads:

[11:39:37] [Server thread/ERROR]: Couldn't place player in world
java.lang.NullPointerException: Cannot invoke "com.kryeit.missions.MissionType.id()" because the return value of "com.kryeit.missions.config.ConfigReader$Mission.missionType()" is null
	at com.kryeit.missions.DataStorage.createActiveMissionTag(DataStorage.java:117) ~[missions-fabric-0.2.6.jar:?]
	at com.kryeit.missions.DataStorage.reassignActiveMissions(DataStorage.java:106) ~[missions-fabric-0.2.6.jar:?]
	at com.kryeit.missions.MissionManager.reassignMissions(MissionManager.java:111) ~[missions-fabric-0.2.6.jar:?]
	at com.kryeit.missions.MissionManager.reassignMissionsIfNecessary(MissionManager.java:100) ~[missions-fabric-0.2.6.jar:?]
	at com.kryeit.Main.handlePlayerLogin(Main.java:85) ~[missions-fabric-0.2.6.jar:?]
	at com.kryeit.MainFabric.lambda$onInitialize$0(MainFabric.java:14) ~[missions-fabric-0.2.6.jar:?]
	at net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents.lambda$static$2(ServerPlayConnectionEvents.java:48) ~[fabric-networking-api-v1-1.2.12+def3f86d90-79c6c1b478adf57f.jar:?]
	at net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon.onClientReady(ServerPlayNetworkAddon.java:65) ~[fabric-networking-api-v1-1.2.12+def3f86d90-79c6c1b478adf57f.jar:?]
	at net.minecraft.class_3324.handler$bme000$fabric-networking-api-v1$handlePlayerConnection(class_3324.java:6013) ~[server-intermediary.jar:?]
	at net.minecraft.class_3324.method_14570(class_3324.java:200) ~[server-intermediary.jar:?]
	at net.minecraft.class_3248.method_33800(class_3248.java:151) ~[server-intermediary.jar:?]
	at net.minecraft.class_3248.method_14384(class_3248.java:138) ~[server-intermediary.jar:?]
	at net.minecraft.class_3248.redirect$bmf000$fabric-networking-api-v1$handlePlayerJoin(class_3248.java:563) ~[server-intermediary.jar:?]
	at net.minecraft.class_3248.method_18784(class_3248.java:73) ~[server-intermediary.jar:?]
	at net.minecraft.class_2535.method_10754(class_2535.java:248) ~[server-intermediary.jar:?]
	at net.minecraft.class_3242.method_14357(class_3242.java:183) ~[server-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:886) ~[server-intermediary.jar:?]
	at net.minecraft.class_3176.method_3813(class_3176.java:289) ~[server-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:819) ~[server-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:665) ~[server-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) ~[server-intermediary.jar:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
[11:39:37] [Server thread/INFO]: KjipGamer lost connection: Invalid player data

It seems like whenever this happens, after trying to rejoin a couple of times, it fixes itself, however usually not on the very next rejoin.

commented

There is. The first 6 stacktrace elements contain our code. Can you send your server's missions.json config file?

commented
commented

this issue might be caused by you updating Create missions. Fan missions were deleted and you still have those in missions.json. Let me know if this is the issue

commented

@muriplz @MrRedRhino We just added the missions mod to our server. Here's missions.json though:
https://pastebin.com/Efsh1U46

commented

do you mind testing https://modrinth.com/mod/missions/version/o3w0znaS this version? its the latest 1.19.2 fabric version

commented

We reworked how missions are randomly gotten, if this issue ever comes up again let us know!