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

Still cannot view offline players inventories #19

Open
JustCyra opened this issue Aug 13, 2021 · 5 comments
Open

Still cannot view offline players inventories #19

JustCyra opened this issue Aug 13, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@JustCyra
Copy link

Describe the bug
Using the view inv command on offline player inventories doesn't do anything expect print the "An unexpected error" message in chat.
It used to crash the server too on 1.4.5 but now on 1.4.6 just prints that error with the message in console (Additional Context)

To Reproduce
Steps to reproduce the behavior:

  1. Attempt to /view an offline player's inventory

Expected behavior
Open a GUI with the offline player's inventory

**Device Info(please complete the following information): Linux server and Linux Desktop

  • OS: Linux (Pop OS 21.04)
  • Minecraft Version 1.17.1
  • Version 1.4.6

Additional context
13.08 02:40:39 [Server] Server thread/INFO Error while reading data: player roles were not initialized
13.08 02:40:39 [Server] Server thread/ Can't keep up! Is the server overloaded? Running 2249ms or 44 ticks behind

@JustCyra JustCyra added the bug Something isn't working label Aug 13, 2021
@JustCyra
Copy link
Author

This is all that the Log leaves:

11:16:30.047
Error while reading data: player roles were not initialized
11:16:30.303
[CHAT] An unexpected error occurred trying to execute that command

It doesn't provide more information

@JustCyra
Copy link
Author

Removing Player Roles mod allows me to access offline players so it is 100% a compatibility issue
Both mods worked together in 1.16.5

@JustCyra
Copy link
Author

JustCyra commented Sep 9, 2021

Bumping this as it's still an issue
Will this be fully fixed at some point?

@PotatoPresident
Copy link
Owner

Pretty busy right now and can't seem to reproduce the issue, can you try running the command with this mod? It should give a more detailed error.

@JustCyra
Copy link
Author

JustCyra commented Sep 21, 2021

Sorry for horrible delay I had a lot on my hands.
This is what I get without the mod once the server crashes when attempting to run the command on an offline player:
java.lang.NullPointerException: player roles were not initialized at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787) at net.minecraft.class_3222.getPlayerRoleSet(class_3222.java:1720) at dev.gegy.roles.PlayerRoles$1.byEntity(PlayerRoles.java:58) at dev.gegy.roles.api.RoleLookup.byPlayer(RoleLookup.java:25) at net.minecraft.class_3222.method_5476(class_3222.java:2199) at io.github.apace100.apoli.power.factory.action.EntityActions.lambda$register$24(EntityActions.java:310) at io.github.apace100.apoli.power.factory.action.ActionFactory$Instance.accept(ActionFactory.java:41) at io.github.apace100.apoli.power.factory.action.EntityActions.lambda$register$8(EntityActions.java:113) at io.github.apace100.apoli.util.Scheduler.lambda$new$0(Scheduler.java:49) at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$2(ServerTickEvents.java:62) at net.minecraft.server.MinecraftServer.handler$zok000$onEndTick(MinecraftServer.java:3827) at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:873) at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) at java.base/java.lang.Thread.run(Thread.java:831)

Strangely enough, I added the mod you suggested and it comflicted with carpet, so I removed it and didn't get the crash, yet when I do the same on a server it still crashes it even without carpet
The crash produces this:

21.09 14:42:10 [Server] Server thread/INFO Error while reading data: player roles were not initialized
21.09 14:42:10 [Server] Server thread/ERROR Command exception: /view inv Bot_Cyrox
21.09 14:42:10 [Server] INFO net.minecraft.class_148: Loading entity NBT
21.09 14:42:10 [Server] INFO at net.minecraft.class_1297.method_5651(class_1297.java:1776) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_29.method_261(class_29.java:56) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_3324.method_14600(class_3324.java:347) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at us.potatoboy.invview.ViewCommand.getRequestedPlayer(ViewCommand.java:144) ~[InvView-1.4.6-1.17.1+.jar:?]
21.09 14:42:10 [Server] INFO at us.potatoboy.invview.ViewCommand.inv(ViewCommand.java:39) ~[InvView-1.4.6-1.17.1+.jar:?]
21.09 14:42:10 [Server] INFO at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:177) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_2170.method_9249(class_2170.java:251) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_3244.method_14370(class_3244.java:1222) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_3244.method_31286(class_3244.java:1206) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_3244.method_12048(class_3244.java:1189) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_2797.method_12115(class_2797.java:30) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_2797.method_11054(class_2797.java:7) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_2600.method_11072(class_2600.java:21) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_3738.run(class_3738.java:18) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_1255.method_18859(class_1255.java:151) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:788) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:164) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_1255.method_16075(class_1255.java:125) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:770) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:764) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_1255.method_18857(class_1255.java:134) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:749) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:701) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at java.lang.Thread.run(Thread.java:831) [?:?]
21.09 14:42:10 [Server] INFO Caused by: java.lang.NullPointerException: player roles were not initialized
21.09 14:42:10 [Server] INFO at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787) ~[fabric-server-launch.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_3222.getPlayerRoleSet(class_3222.java:1720) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at dev.gegy.roles.PlayerRoles$1.byEntity(PlayerRoles.java:58) ~[player-roles-1.4.3.jar:?]
21.09 14:42:10 [Server] INFO at dev.gegy.roles.api.RoleLookup.byPlayer(RoleLookup.java:25) ~[2054f07f-3368-45ab-920a-bced532197cc.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_3222.method_5476(class_3222.java:2199) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at io.github.apace100.apoli.power.factory.action.EntityActions.lambda$register$24(EntityActions.java:310) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:10 [Server] INFO at io.github.apace100.apoli.power.factory.action.ActionFactory$Instance.accept(ActionFactory.java:41) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:10 [Server] INFO at io.github.apace100.apoli.power.ActionOnCallbackPower.onAdded(ActionOnCallbackPower.java:56) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:10 [Server] INFO at io.github.apace100.apoli.component.PowerHolderComponentImpl.addPower(PowerHolderComponentImpl.java:159) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:10 [Server] INFO at io.github.apace100.apoli.component.PowerHolderComponentImpl.addPower(PowerHolderComponentImpl.java:152) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:10 [Server] INFO at io.github.apace100.origins.component.PlayerOriginComponent.grantPowersFromOrigin(PlayerOriginComponent.java:86) ~[Origins-1.17-1.0.3.jar:?]
21.09 14:42:10 [Server] INFO at io.github.apace100.origins.component.PlayerOriginComponent.fromTag(PlayerOriginComponent.java:165) ~[Origins-1.17-1.0.3.jar:?]
21.09 14:42:10 [Server] INFO at io.github.apace100.origins.component.PlayerOriginComponent.onPowersRead(PlayerOriginComponent.java:107) ~[Origins-1.17-1.0.3.jar:?]
21.09 14:42:10 [Server] INFO at io.github.apace100.apoli.component.PowerHolderComponentImpl.handler$bep000$loadOriginAfterPowers(PowerHolderComponentImpl.java:530) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:10 [Server] INFO at io.github.apace100.apoli.component.PowerHolderComponentImpl.readFromNbt(PowerHolderComponentImpl.java:172) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:10 [Server] INFO at dev.onyxstudios.cca.internal.base.AbstractComponentContainer.fromTag(AbstractComponentContainer.java:93) ~[44285641-1631-4a91-8e87-b14defb3ae5e.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_1297.handler$bff000$fromTag(class_1297.java:13042) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO at net.minecraft.class_1297.method_5651(class_1297.java:1767) ~[intermediary-server.jar:?]
21.09 14:42:10 [Server] INFO ... 26 more
21.09 14:42:12 [Server] Server thread/ERROR Encountered an unexpected exception
21.09 14:42:12 [Server] INFO java.lang.NullPointerException: player roles were not initialized
21.09 14:42:12 [Server] INFO at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787) ~[fabric-server-launch.jar:?]
21.09 14:42:12 [Server] INFO at net.minecraft.class_3222.getPlayerRoleSet(class_3222.java:1720) ~[intermediary-server.jar:?]
21.09 14:42:12 [Server] INFO at dev.gegy.roles.PlayerRoles$1.byEntity(PlayerRoles.java:58) ~[player-roles-1.4.3.jar:?]
21.09 14:42:12 [Server] INFO at dev.gegy.roles.api.RoleLookup.byPlayer(RoleLookup.java:25) ~[2054f07f-3368-45ab-920a-bced532197cc.jar:?]
21.09 14:42:12 [Server] INFO at net.minecraft.class_3222.method_5476(class_3222.java:2199) ~[intermediary-server.jar:?]
21.09 14:42:12 [Server] INFO at io.github.apace100.apoli.power.factory.action.EntityActions.lambda$register$24(EntityActions.java:310) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:12 [Server] INFO at io.github.apace100.apoli.power.factory.action.ActionFactory$Instance.accept(ActionFactory.java:41) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:12 [Server] INFO at io.github.apace100.apoli.power.factory.action.EntityActions.lambda$register$8(EntityActions.java:113) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:12 [Server] INFO at io.github.apace100.apoli.util.Scheduler.lambda$new$0(Scheduler.java:49) ~[0c5c43bf-d616-4b81-b690-c80a50f64a19.jar:?]
21.09 14:42:12 [Server] INFO at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$2(ServerTickEvents.java:62) ~[ab95bd3b-3c11-497f-86d4-cf2b3b8eb529.jar:?]
21.09 14:42:12 [Server] INFO at net.minecraft.server.MinecraftServer.handler$zok000$onEndTick(MinecraftServer.java:3827) ~[intermediary-server.jar:?]
21.09 14:42:12 [Server] INFO at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:873) ~[intermediary-server.jar:?]
21.09 14:42:12 [Server] INFO at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) ~[intermediary-server.jar:?]
21.09 14:42:12 [Server] INFO at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-server.jar:?]
21.09 14:42:12 [Server] INFO at java.lang.Thread.run(Thread.java:831) [?:?]
21.09 14:42:12 [Server] Server thread/ERROR This crash report has been saved to: /./crash-reports/crash-2021-09-21_18.42.12-server.txt
21.09 14:42:12 [Server] Server thread/INFO Stopping server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants