Phoenix616 / Snap

Experimental tool to run BungeeCord plugins on Velocity
https://hangar.papermc.io/Phoenix616/Snap
GNU Lesser General Public License v3.0
116 stars 10 forks source link

Multilobby (+Matchmaker) Error #40

Closed EwansXD closed 2 years ago

EwansXD commented 2 years ago

Used Version

[20:49:55 INFO]: Loaded plugin snap 1.1-SNAPSHOT (build 29) by Phoenix616

Config

{
    # configurate-hocon
    # Whether to register all forwarding listeners even though no plugin needs it
    # This is required if a plugin tries to dynamically register events after its onEnable method was called
    "register-all-listeners" : true,
    # configurate-hocon
    # The stats/metrics ID of this proxy, ideally the same as in the velocity.toml
    "stats-id" : "e89feee0-4839-475f-ad21-00b1245d5d56",
    # configurate-hocon
    # Whether to throw exceptions when accessing methods that aren't supported
    # Setting this to false makes them return sensible values but they might not be correct
    "throw-unsupported-exception" : true
}

Environment description

Latest Velocity, Multilobby (+Matchmaker) & running 1.17.1 on the backend

Full Log

[20:54:30 ERROR]: Exception in task cz.gameteam.dakado.mlminigames.managers.QueueManager$1@bfb6b30 by plugin Snap
java.lang.NullPointerException: server
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:897) ~[velocity-3.1.2-SNAPSHOT-140.jar:3.1.2-SNAPSHOT (git-377e6b66-b140)]
        at com.velocitypowered.proxy.server.ServerMap.getServer(ServerMap.java:48) ~[velocity-3.1.2-SNAPSHOT-140.jar:3.1.2-SNAPSHOT (git-377e6b66-b140)]
        at com.velocitypowered.proxy.VelocityServer.getServer(VelocityServer.java:671) ~[velocity-3.1.2-SNAPSHOT-140.jar:3.1.2-SNAPSHOT (git-377e6b66-b140)]
        at de.themoep.snap.forwarding.SnapProxyServer.getServerInfo(SnapProxyServer.java:216) ~[?:?]
        at cz.gameteam.dakado.mlminigames.managers.QueueManager$1.run(QueueManager.java:39) ~[?:?]
        at com.velocitypowered.proxy.scheduler.VelocityScheduler$VelocityTask.lambda$run$1(VelocityScheduler.java:203) ~[velocity-3.1.2-SNAPSHOT-140.jar:3.1.2-SNAPSHOT (git-377e6b66-b140)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

What other programs/plugins are you running?

N/A

What is happening?

When trying to join a queue, throws said error (From what I can tell, the plugin is unable to fetch the MOTD from the backend server)

What did you expect to happen?

Moves player to available bedwars server.

Additional context

N/A

Phoenix616 commented 2 years ago

As far as I can tell that error occurs because the plugin itself passed null as the name into the ProxyServer#getServerInfo method. That's not really something that can be supported, not even on Bungee, and would need to be fixed in the plugin itself.

EwansXD commented 2 years ago

Works on Waterfall so it seems to be an issue with Velocity/Snap. I saw another issue open about the proxy not being able to fetch the servers MOTD so i'm guessing its something to do with that.

Phoenix616 commented 2 years ago

Well while it might work it's still an error in how the plugin itself works, there should be no reason to ever pass null as the server name but I will add compatibility for such a non-standard behaviour I guess.

EwansXD commented 2 years ago

Thanks, i'll let the original plugin developer know aswell so he can fix the issue. This may be useful for other cases in the future 🤷

(=