Skip to content

[Fabric] ServiceLoader fails to locate GsonDataComponentValueConverterProvider on Minecraft 26.2 (Fabric Loader 0.19.3) #1568

Description

@ivanxuyifan

Describe the bug
PacketEvents (both 2.13.0 and the latest 2.13.1-SNAPSHOT from GitHub Actions) crashes during the preLaunch phase on a Fabric server running Minecraft 26.2 (data version 26.2). The error originates from the DataComponentValueConverterRegistry static initializer, which uses ServiceLoader to find DataComponentValueConverterRegistry$Provider implementations. It fails to locate GsonDataComponentValueConverterProvider from the Adventure Gson serializer module, even though that dependency is required for proper serialization.

When manually placing adventure-text-serializer-gson-4.26.1.jar and adventure-text-serializer-json-4.26.1.jar into the mods folder, Fabric treats them as non‑mod JARs and does not expose them to PacketEvents’ classloader, so the ServiceLoader still cannot find the provider. A custom “bridge” mod that forces early loading of GsonComponentSerializer also fails with ClassNotFoundException due to classloader isolation.

Software brand

  • Minecraft version: 26.2 (the new versioning scheme, equivalent to the 2026‑02 major update)
  • Server software: Fabric server (vanilla with Fabric Loader)
  • Fabric Loader version: 0.19.3
  • Java version: 25 (OpenJDK)

Plugins (mods)
The issue occurs even with a minimal mod set, but here is the full list from the crash log (irrelevant mods omitted for brevity):

  • PacketEvents (both packetevents-fabric-common and packetevents-fabric-official) – 2.13.0 and 2.13.1+b844616-SNAPSHOT
  • Fabric API 0.156.0+26.2
  • Fabric Loader 0.19.3
  • Other mods (Carpet, Floodgate, LuckPerms, etc.) do not seem to affect the problem; removing them does not resolve it.

How To Reproduce

  1. Set up a Fabric server for Minecraft 26.2 with Fabric Loader 0.19.3.
  2. Place the latest PacketEvents Fabric JAR (e.g., packetevents-fabric-2.13.0.jar) into the mods/ folder.
  3. Start the server using the Fabric launcher (fabric-server-launch.jar).
  4. The server crashes during pre‑launch with the stack trace shown below.

Expected behavior
The server should start without errors, and PacketEvents should load its Adventure dependencies correctly so that the Gson serializer is available for data component conversions.

Screenshots
(Not applicable – log excerpt is provided instead.)

Additional context

  • The underlying issue is that PacketEvents’ Fabric distribution does not include adventure-text-serializer-gson and adventure-text-serializer-json, and also does not declare them as dependencies in fabric.mod.json.
  • In Fabric’s isolated classloading environment, simply dropping those JARs into mods/ is insufficient because they are not treated as mods and therefore are not added to the classpath of PacketEvents.
  • We attempted to work around this by creating a small “bridge” mod that calls GsonComponentSerializer.gson() in a preLaunch entrypoint, hoping to force the ServiceLoader to register the provider. However, that bridge cannot access the classes because Fabric does not expose the manually added JARs to it either.
  • The issue is specific to Fabric – Bukkit/Spigot users do not report this problem because those platforms use a flat classpath.
  • The crash log is attached below (full stack trace).

Crash Log (excerpt):

[INFO] 正在启动...
[INFO] 应用实例已运行,您可以在底部的命令输入框发送命令,如果您需要支持 Ctrl,Tab 等快捷键等高级控制台功能,请前往终端设置开启仿真终端功能
[INFO] 实例已启动...
Starting net.fabricmc.loader.impl.game.minecraft.BundlerClassPathCapture
[23:19:58] [main/INFO]: Loading Minecraft 26.2 with Fabric Loader 0.19.3
[23:19:58] [main/INFO]: Mappings not present!
[23:19:58] [main/INFO]: Loading 87 mods:
        - appleskin 3.0.10+mc26.2
        - carpet 26.2+v260616
        - carpet-tis-addition 1.82.4
           \-- conditional-mixin 0.6.4
        - fabric-api 0.156.0+26.2
           |-- fabric-api-base 2.0.4+ece063239e
           |-- fabric-api-lookup-api-v1 2.0.17+11e1c9a39e
           |-- fabric-biome-api-v1 18.0.6+c7bd5b8e9e
           |-- fabric-block-api-v1 3.0.3+ec56b6019e
           |-- fabric-block-getter-api-v2 2.0.7+ec56b6019e
           |-- fabric-command-api-v2 3.1.0+00cb03469e
           |-- fabric-content-registries-v0 11.3.0+d0a699d09e
           |-- fabric-convention-tags-v2 4.7.0+1f023a9e9e
           |-- fabric-crash-report-info-v1 1.0.5+086d547a9e
           |-- fabric-creative-tab-api-v1 5.0.14+d871b99e9e
           |-- fabric-data-attachment-api-v1 2.2.18+515ac5339e
           |-- fabric-data-generation-api-v1 25.5.0+aed122aa9e
           |-- fabric-debug-api-v1 1.0.2+c792624d9e
           |-- fabric-dimensions-v1 5.1.11+515ac5339e
           |-- fabric-entity-events-v1 5.0.5+06488ac19e
           |-- fabric-events-interaction-v0 5.2.7+515ac5339e
           |-- fabric-game-rule-api-v1 4.0.8+46a6d00c9e
           |-- fabric-item-api-v1 14.4.0+49a69a7b9e
           |-- fabric-key-mapping-api-v1 2.0.5+e2bdee789e
           |-- fabric-lifecycle-events-v1 4.1.3+4575b05f9e
           |-- fabric-loot-api-v3 3.0.17+06488ac19e
           |-- fabric-menu-api-v1 2.0.16+086d547a9e
           |-- fabric-message-api-v1 7.0.7+086d547a9e
           |-- fabric-model-loading-api-v1 8.0.16+c80601bb9e
           |-- fabric-networking-api-v1 6.3.3+72073ef09e
           |-- fabric-object-builder-api-v1 24.1.0+6fcd5f039e
           |-- fabric-particles-v1 5.0.18+d1756aa99e
           |-- fabric-permission-api-v1 1.0.4+536fad2f9e
           |-- fabric-recipe-api-v1 9.0.20+11e1c9a39e
           |-- fabric-registry-sync-v0 7.1.0+c7bd5b8e9e
           |-- fabric-renderer-api-v1 14.1.3+2b0d8a229e
           |-- fabric-renderer-indigo 9.1.3+2b0d8a229e
           |-- fabric-rendering-fluids-v1 6.0.4+06488ac19e
           |-- fabric-rendering-v1 25.3.2+515ac5339e
           |-- fabric-resource-conditions-api-v1 6.1.0+10e9a28b9e
           |-- fabric-resource-loader-v0 3.3.20+4fc5413f9e
           |-- fabric-resource-loader-v1 2.0.13+9edec1269e
           |-- fabric-screen-api-v1 5.1.0+48e3c0b09e
           |-- fabric-serialization-api-v1 2.0.4+11a26f319e
           |-- fabric-sound-api-v1 2.0.5+11a26f319e
           |-- fabric-tag-api-v1 2.1.4+515ac5339e
           |-- fabric-transfer-api-v1 8.0.12+11dbb7d79e
           \-- fabric-transitive-access-wideners-v1 8.1.4+67c847259e
        - fabricloader 0.19.3
           \-- mixinextras 0.5.4
        - fabricproxy-lite 2.12.0
           \-- com_moandjiezana_toml_toml4j 0.7.2
        - floodgate 2.2.6-SNAPSHOT
           |-- aopalliance_aopalliance 1.0
           |-- cloud 2.0.0-SNAPSHOT
           |    |-- io_leangen_geantyref_geantyref 1.3.15
           |    |-- org_incendo_cloud-brigadier 2.0.0-beta.15
           |    |-- org_incendo_cloud-core 2.0.0
           |    |-- org_incendo_cloud-minecraft-modded-common 2.0.0-SNAPSHOT
           |    \-- org_incendo_cloud-services 2.0.0
           |-- com_google_guava_failureaccess 1.0.1
           |-- jakarta_inject_jakarta_inject-api 2.0.1
           |-- javax_inject_javax_inject 1
           |-- org_geysermc_cumulus_cumulus 1.1.2
           |-- org_geysermc_event_events 1.1-SNAPSHOT
           |-- org_geysermc_geyser_common_unshaded 2.2.1-SNAPSHOT
           |-- org_java-websocket_java-websocket 1.6.0
           \-- org_lanternpowered_lmbda 2.0.0
        - gca_wrapper 1.0.6
           |-- gca 2.12.6-mc26.2+build.94
           \-- jep_jep 2.24
        - jade 26.2.10+fabric
        - java 25
        - luckperms 5.5.57
           \-- fabric-permissions-api-v0 0.7.0
        - minecraft 26.2
        - nochatreports 26.2-v2.20.1
        - packetevents 2.13.0
           |-- com_github_retrooper_api 2.13.0
           |-- com_github_retrooper_netty-common 2.13.0
           |-- net_kyori_adventure-api 4.26.1
           |-- net_kyori_adventure-key 4.26.1
           |-- net_kyori_adventure-nbt 4.26.1
           |-- net_kyori_adventure-text-logger-slf4j 4.26.1
           |-- net_kyori_examination-api 1.3.0
           |-- net_kyori_examination-string 1.3.0
           |-- packetevents-fabric-common 2.13.0
           \-- packetevents-fabric-official 2.13.0
        - plan 5.8+build.3605
        - servux 0.11.2
           |-- fabric-api-base 2.0.4+ece063239e
           \-- fabric-permissions-api-v0 0.7.0
        - syncmatica 0.3.19
           |-- fabric-api-base 2.0.4+ece063239e
           \-- fabric-permissions-api-v0 0.7.0
        - xaerominimap 26.4.2
           \-- xaerolib 1.7.1
        - xaeroworldmap 1.44.2
           \-- xaerolib 1.7.1
[23:19:58] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.7 Source=file:/Users/worldskyline/Documents/WorldSkyline%E6%9C%8D%E5%8A%A1%E7%AB%AF/WorldSkyline_%E7%94%9F%E7%94%B5/libraries/net/fabricmc/sponge-mixin/0.17.3+mixin.0.8.7/sponge-mixin-0.17.3+mixin.0.8.7.jar Service=Knot/Fabric Env=SERVER
[23:19:58] [main/INFO]: Compatibility level set to JAVA_25
[23:19:58] [main/WARN]: Reference map 'xaerolib.refmap.json' for xaerolib.mixins.json could not be read. If this is a development environment you can ignore this message
[23:19:58] [main/WARN]: Reference map 'xaeroworldmap.refmap.json' for xaeroworldmap.mixins.json could not be read. If this is a development environment you can ignore this message
[23:19:58] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.5.4).
[23:19:58] [main/INFO]: Loading packetevents...
[23:19:59] [main/ERROR]: A mod crashed on startup!
net.fabricmc.loader.impl.FormattedException: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'packetevents-fabric-common' at 'io.github.retrooper.packetevents.PacketEventsMod'!
        at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:63)
        at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:158)
        at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:66)
        at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23)
        at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69)
        at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69)
Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'packetevents-fabric-common' at 'io.github.retrooper.packetevents.PacketEventsMod'!
        at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$0(FabricLoaderImpl.java:413)
        at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
        at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:411)
        at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:156)
        ... 4 more
Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'pePreLaunchServer' due to errors, provided by 'packetevents-fabric-official' at 'io.github.retrooper.packetevents.PacketEventsServerMod'!
        at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$0(FabricLoaderImpl.java:413)
        at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
        at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:411)
        at knot//io.github.retrooper.packetevents.PacketEventsMod.onPreLaunch(PacketEventsMod.java:40)
        at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:409)
        ... 5 more
Caused by: java.lang.ExceptionInInitializerError
        at knot//net.kyori.adventure.text.event.DataComponentValueConverterRegistry$ConversionCache.collectConversions(DataComponentValueConverterRegistry.java:189)
        at knot//net.kyori.adventure.text.event.DataComponentValueConverterRegistry$ConversionCache.<clinit>(DataComponentValueConverterRegistry.java:185)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:467)
        at java.base/java.lang.Class.forName(Class.java:458)
        at knot//com.github.retrooper.packetevents.util.adventure.AdventureConversionInjector.inject(AdventureConversionInjector.java:60)
        at knot//com.github.retrooper.packetevents.PacketEventsAPI.load(PacketEventsAPI.java:80)
        at knot//io.github.retrooper.packetevents.factory.fabric.FabricPacketEventsAPI.load(FabricPacketEventsAPI.java:88)
        at knot//io.github.retrooper.packetevents.PacketEventsServerMod.onPreLaunch(PacketEventsServerMod.java:54)
        at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:409)
        ... 7 more
Caused by: java.lang.IllegalStateException: Encountered an exception loading a provider for interface net.kyori.adventure.text.event.DataComponentValueConverterRegistry$Provider: 
        at knot//net.kyori.adventure.util.Services.services(Services.java:146)
        at knot//net.kyori.adventure.text.event.DataComponentValueConverterRegistry.<clinit>(DataComponentValueConverterRegistry.java:55)
        ... 17 more
Caused by: java.util.ServiceConfigurationError: net.kyori.adventure.text.event.DataComponentValueConverterRegistry$Provider: Provider net.kyori.adventure.text.serializer.gson.impl.GsonDataComponentValueConverterProvider not found
        at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:559)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1090)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1099)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1142)
        at java.base/java.util.ServiceLoader$1.hasNext(ServiceLoader.java:1164)
        at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1246)
        at knot//net.kyori.adventure.util.Services.services(Services.java:140)
        ... 18 more
[INFO] 实例已停止。

I am happy to provide the complete log or test any development builds. Please let me know if you need further details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions