AppleSkin

AppleSkin

236M Downloads

Fabric 1.17 NoClassDefFoundError on player joining server

InfoTeddy opened this issue ยท 5 comments

commented

If the 1.17-fabric branch is installed on a server (I compiled it from source), it crashes with a NoClassDefFoundError whenever a player joins.

I can reproduce the crash with only AppleSkin and Fabric API (a required dependency) installed on the server, as shown in the following crash log:

---- Minecraft Crash Report ----
// Don't be sad, have a hug! <3

Time: 6/18/21, 9:43 PM
Description: Exception in server tick loop

java.lang.NoClassDefFoundError: net/minecraft/class_746
	at net.minecraft.class_3324.handler$zdg001$onPlayerConnect(class_3324.java:1923)
	at net.minecraft.class_3324.method_14570(class_3324.java:274)
	at net.minecraft.class_3248.method_33800(class_3248.java:129)
	at net.minecraft.class_3248.method_14384(class_3248.java:117)
	at net.minecraft.class_3248.redirect$zcn000$handlePlayerJoin(class_3248.java:563)
	at net.minecraft.class_3248.method_18785(class_3248.java:67)
	at net.minecraft.class_2535.method_10754(class_2535.java:234)
	at net.minecraft.class_3242.method_14357(class_3242.java:183)
	at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:904)
	at net.minecraft.class_3176.method_3813(class_3176.java:334)
	at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:833)
	at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:692)
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:274)
	at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.ClassNotFoundException: net.minecraft.class_746
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:636)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
	at net.fabricmc.loader.launch.server.InjectingURLClassLoader.loadClass(InjectingURLClassLoader.java:57)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
	at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:175)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
	... 14 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 1.17
	Minecraft Version ID: 1.17
	Operating System: Linux (arm) version 5.10.17-v7l+
	Java Version: 16.0.1, AdoptOpenJDK
	Java VM Version: OpenJDK Server VM (mixed mode), AdoptOpenJDK
	Memory: 1073315152 bytes (1023 MiB) / 1858076672 bytes (1772 MiB) up to 2147483648 bytes (2048 MiB)
	CPUs: 4
	Processor Vendor: armv7l
	Processor Name: ARMv7 Processor rev 3 (v7l)
	Identifier: armv7l Family 7 Model 0xd08 Stepping r0x0p3
	Microarchitecture: unknown
	Frequency (GHz): -0.00
	Number of physical packages: 1
	Number of physical CPUs: 1
	Number of logical CPUs: 4
	Graphics card #0 name: unknown
	Graphics card #0 vendor: unknown
	Graphics card #0 VRAM (MB): 0.00
	Graphics card #0 deviceId: unknown
	Graphics card #0 versionInfo: unknown
	Virtual memory max (MB): 2013.63
	Virtual memory used (MB): 2246.48
	Swap memory total (MB): 100.00
	Swap memory used (MB): 10.25
	JVM Flags: 3 total; -XX:+UseG1GC -Xms512M -Xmx2G
	Fabric Mods: 
		appleskin: AppleSkin 1.0.11
		fabric: Fabric API 0.35.2+1.17
		fabric-api-base: Fabric API Base 0.3.0+a02b44633d
		fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.1.0+1d383bb63d
		fabric-biome-api-v1: Fabric Biome API (v1) 3.1.11+c345aea83d
		fabric-command-api-v1: Fabric Command API (v1) 1.1.1+a02b44633d
		fabric-commands-v0: Fabric Commands (v0) 0.2.2+92519afa3d
		fabric-containers-v0: Fabric Containers (v0) 0.1.12+a02b44633d
		fabric-content-registries-v0: Fabric Content Registries (v0) 0.2.2+a02b44633d
		fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.5+be9da3103d
		fabric-dimensions-v1: Fabric Dimensions API (v1) 2.0.10+a02b44633d
		fabric-entity-events-v1: Fabric Entity Events (v1) 1.1.0+a02b44633d
		fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.8+a02b44633d
		fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.1+92519afa3d
		fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.6+a02b44633d
		fabric-item-api-v1: Fabric Item API (v1) 1.2.4+a02b44633d
		fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.10+b7ab61213d
		fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.4.4+a02b44633d
		fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.4+a02b44633d
		fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.3+92519afa3d
		fabric-networking-api-v1: Fabric Networking API (v1) 1.0.11+b7ab61213d
		fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.11+a02b44633d
		fabric-networking-v0: Fabric Networking (v0) 0.3.2+92519afa3d
		fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.10.9+b7ab61213d
		fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.3+a02b44633d
		fabric-particles-v1: Fabric Particles (v1) 0.2.4+a02b44633d
		fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.7.10+e2961fee3d
		fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.5+a02b44633d
		fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.7+b7ab61213d
		fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.8+a02b44633d
		fabric-structure-api-v1: Fabric Structure API (v1) 1.1.11+e36969833d
		fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.1.4+a02b44633d
		fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.2.12+b7ab61213d
		fabricloader: Fabric Loader 0.11.6
		java: OpenJDK Server VM 16
		minecraft: Minecraft 1.17
	Player Count: 1 / 20; [class_3222['InfoTeddy'/204, l='ServerLevel[world]', x=127.09, y=64.00, z=362.45]]
	Data Packs: vanilla (incompatible), file/bukkit (incompatible), Fabric Mods
	Is Modded: Definitely; Server brand changed to 'fabric'
	Type: Dedicated Server (map_server.txt)
commented

Thanks for the report, haven't tested the newest commits on a server yet.

commented

@squeek502 I setup a server for Fabric 1.17, very strange if I repleace the PlayerManagerMixin.onPlayerConnect and ServerPlayerEntityMixin.onUpdate empty implementation it will work

commented

Looks like ClientPlayNetworking uses @Environment(EnvType.CLIENT) meaning that when SyncHandler tries to import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking when AppleSkin is running on the server, that class is missing.

One fix would be to separate SyncHandler into two classes:

  • ClientSyncHandler
  • SyncHandler
commented

Yep, that was the issue. Fixed by f51d172

commented

That was quick, thanks!