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

Kyori Adventure not usable in more than one Bungeecord/Waterfall plugin #1171

Open
1 task done
itsTyrion opened this issue Mar 22, 2023 · 6 comments
Open
1 task done
Labels
r: out of scope The issue pull request is out of scope for CloudNet s: needs triage Issue waiting for triage t: bug Something isn't working as intended

Comments

@itsTyrion
Copy link

itsTyrion commented Mar 22, 2023

Stacktrace

[Proxy-1] [21:07:20 ERROR]: [/185.17.205.220:11020|IchKnuddelDich] -> UpstreamBridge - encountered exception
[Proxy-1] java.lang.LinkageError: loader constraint violation: loader net.md_5.bungee.api.plugin.PluginClassloader @17430f69 wants to load interface net.kyori.adventure.text.Component. A different interface with the same name was previously loaded by net.md_5.bungee.api.plugin.PluginClassloader @6aa5581c. (net.kyori.adventure.text.Component is in unnamed module of loader net.md_5.bungee.api.plugin.PluginClassloader @6aa5581c, parent loader 'app')
[Proxy-1]    at de.itsTyrion.crashtest.bungee.cmd.Ping.execute(Ping.kt:25) ~[?:?]
[Proxy-1]    at net.md_5.bungee.api.plugin.PluginManager.dispatchCommand(PluginManager.java:213) ~[waterfall.jar:git:Waterfall-Bootstrap:1.19-R0.1-SNAPSHOT:8a03f3d:515]

Actions to reproduce

Use adventure-platform-bungee in one plugin (shaded ofc), do something with adventure components in another plugin depending on the first one.

Tested with a basic default setup, a Lobby server (Purpur 1.19.3 for CN4, Paper 1.19.2 for CN3), and static waterfall-latest.

CN3
image
CN4
image

The mini plugin I reproduced this with can be found here:
https://github.com/itsTyrion/crashtest - I uploaded the compiled release incl the plugin with all the kotlin libs in releases.
For builds gradle buildArtifacts builds and collects the artifacts in a dist folder but gradle jar in both modules works too.

Kotlin isn't shaded with the current config tho - and it works in all plugins.
made a 2nd branch that shades kotlin and uploaded that as as release, too

CloudNet version

INFO:
INFO: CloudNet Blizzard 4.0.0-RC8 7ea69a0a
INFO: Discord: <https://discord.cloudnetservice.eu/>
INFO:
INFO: ClusterId: 3eee53da-****-4de9-****-a04504515c93
INFO: NodeId: srv01
INFO: Head-NodeId: srv03
INFO: CPU usage: (P/S) 5.13/16.81/100%
INFO: Node services memory allocation (U/R/M): 8192/8192/15000 MB
INFO: Threads: 54
INFO: Heap usage: 46/256MB
INFO: JVM: Debian 17 (OpenJDK 64-Bit Server VM 17.0.6+10-Debian-1deb11u1)
INFO: Update Repo: CloudNetService/launchermeta, Update Branch: beta
INFO:

Other

No response

Issue uniqueness

  • Yes, this issue is unique. There are no similar issues.
@itsTyrion itsTyrion added s: needs triage Issue waiting for triage t: bug Something isn't working as intended labels Mar 22, 2023
@alessiobrendt
Copy link

I also have this problem

@itsTyrion
Copy link
Author

itsTyrion commented Mar 26, 2023

Solvable by using an older version of MiniMessage (4.12.0) and adventure-platform-bungeecord (4.2.0)

e: nevermind it's not :(

@kxmpxtxnt
Copy link

an temporary fix for this is maybe just using velocity instead :) but I will take a look at this

@kxmpxtxnt
Copy link

an temporary fix for this is maybe just using velocity instead :) but I will take a look at this

well actually this looks like a classloader bug which has nothing in common with cloudnet

@itsTyrion
Copy link
Author

Solution: downgrade adventure-platform-bungeecord to a version that matches cloudnet and shade it but exclude adventure-api. Yes, even if the version matches CloudNet's version.

@derklaro
Copy link
Member

This is very likely a BungeeCord issue. This error does not occur on other platforms. But if exclusion works go with it I guess. The shaded version of adventure was bumped to latest in the nightly builds :)

@derklaro derklaro added the r: out of scope The issue pull request is out of scope for CloudNet label Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r: out of scope The issue pull request is out of scope for CloudNet s: needs triage Issue waiting for triage t: bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

4 participants