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

Snap dont work well with skinrestorer(velocity) plugin #6

Closed bugram closed 3 years ago

bugram commented 3 years ago

Used Version

8 build found at https://ci.minebench.de -->

Config

# 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

Linux, java11

Full Log

[16:17:34 WARN]: ALL packets going through the proxy will be compressed. This will compromise throughput and increase CPU usage!
[16:17:34 INFO]: Loading plugins...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/E:/minecraft/pebble1/velocity-1.1.4.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[16:17:34 INFO] [advancedportals]: Advanced portals have been successfully enabled!
[16:17:34 INFO]: Loaded plugin advancedportals 0.5.12 by
[16:17:35 INFO]: Loaded plugin epicguard 5.3.0 by
[16:17:35 INFO]: Loaded plugin geyser 1.2.0-SNAPSHOT (git-master-e0e435f) by GeyserMC
[16:17:35 INFO]: Loaded plugin luckperms 5.2.120 by Luck
[16:17:35 INFO]: Loaded plugin minimotd-velocity 2.0.0 by jmp
[16:17:35 INFO]: Loaded plugin plan 5.2 build 1068 by AuroraLS3
[16:17:35 INFO]: Loaded plugin simpleautomessages 1.1 by Leymooo
[16:17:35 INFO]: Loaded plugin skinsrestorer 13.8.9 by McLive
[16:17:35 INFO]: Loaded plugin snap 1.0-SNAPSHOT (build 8) by Phoenix616
[16:17:35 INFO]: Loaded plugin spark 1.4.3 by Luck, sk89q
[16:17:35 INFO]: Loaded plugin tab 2.8.11-pre6 by NEZNAMY
[16:17:35 INFO]: Loaded plugin tcpshield 2.4 by TCPShield
[16:17:35 INFO]: Loaded plugin viaversion 3.2.1 by _MylesC, creeper123123321, Gerrygames, KennyTV, Matsv
[16:17:35 INFO]: Loaded plugin viabackwards 3.2.0 by Matsv, KennyTV, Gerrygames, creeper123123321, ForceUpdate1
[16:17:35 INFO]: Loaded plugin viarewind 1.5.3 by Gerrygames
[16:17:35 INFO]: Loaded 15 plugins
[16:17:35 INFO]:         __
[16:17:35 INFO]:   |    |__)   LuckPerms v5.2.120
[16:17:35 INFO]:   |___ |      Running on Velocity - Velocity
[16:17:35 INFO]:
[16:17:35 INFO] [luckperms]: Loading configuration...
[16:17:36 INFO] [luckperms]: Loading storage provider... [H2]
[16:17:36 INFO] [luckperms]: Loading internal permission managers...
[16:17:36 INFO] [luckperms]: Performing initial data load...
[16:17:36 INFO] [luckperms]: Successfully enabled. (took 986ms)
[16:17:36 INFO] [epicguard]: Loading configuration...
[16:17:36 INFO] [epicguard]: This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com
[16:17:36 INFO] [epicguard]: EpicGuard v5 finished startup successfully.
[16:17:37 INFO] [geyser]: ******************************************
[16:17:37 INFO] [geyser]:
[16:17:37 INFO] [geyser]: Loading Geyser version 1.2.0-SNAPSHOT (git-master-e0e435f)
[16:17:37 INFO] [geyser]:
[16:17:37 INFO] [geyser]: ******************************************
[16:17:41 INFO] [geyser]: Started Geyser on 0.0.0.0:25597
[16:17:41 INFO] [geyser]: Done (4,241s)! Run /geyser help for help!
[16:17:41 INFO] [plan]:
[16:17:41 INFO] [plan]:            ██▌
[16:17:41 INFO] [plan]:      ██▌   ██▌
[16:17:41 INFO] [plan]:   ██▌██▌██▌██▌  Player Analytics
[16:17:41 INFO] [plan]:   ██▌██▌██▌██▌  v5.2 build 1068
[16:17:41 INFO] [plan]:
[16:17:41 INFO] [plan]: Locale: 'English' by AuroraLS3
[16:17:41 INFO] [minimotd-velocity]: You are running the latest version of MiniMOTD! :)
[16:17:42 INFO] [plan]: You're using the latest version.
[16:17:47 ERROR] [plan]: ----------------------------------------
[16:17:47 ERROR] [plan]: Error: MySQL init failure: Failed to initialize pool: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[16:17:47 ERROR] [plan]: ----------------------------------------
[16:17:47 ERROR] [plan]: Plugin Failed to Initialize Correctly. If this issue is caused by config settings you can use /planvelocity reload
[16:17:47 INFO] [plan]: Processing critical unprocessed tasks. (0)
[16:17:47 INFO] [plan]: Processing complete.
[16:17:47 INFO] [plan]: Player Analytics Disabled.
[16:17:47 INFO] [simpleautomessages]: Loading config
[16:17:47 INFO] [simpleautomessages]: Config loaded
[16:17:47 INFO] [simpleautomessages]: Plugin will be enabled after 3 seconds
[16:17:47 INFO] []: [SkinsRestorer] Enabling SkinsRestorer v13.8.9
[16:17:47 INFO] []: [SkinsRestorer] Enabled SkinsRestorer v13.8.9
[16:17:47 INFO]: [SkinsRestorer] ----------------------------------------------
[16:17:47 INFO]: [SkinsRestorer]     +===============+
[16:17:47 INFO]: [SkinsRestorer]     | SkinsRestorer |
[16:17:47 INFO]: [SkinsRestorer]     +===============+
[16:17:47 INFO]: [SkinsRestorer] ----------------------------------------------
[16:17:47 INFO]: [SkinsRestorer]     Current version: 13.8.9
[16:17:47 INFO]: [SkinsRestorer]     This is the latest version!
[16:17:47 INFO]: [SkinsRestorer] ----------------------------------------------
[16:17:49 INFO] [snap]: Loaded snap.conf
[16:17:50 INFO] [simpleautomessages]: Staring AutoMessages tasks
[16:17:50 INFO] [simpleautomessages]: 'global' was started
[16:17:50 INFO] [simpleautomessages]: 'lobbies' was started
[16:17:50 WARN] [simpleautomessages]: Servers for 'minigames' is not specified or empty
[16:17:50 WARN] [simpleautomessages]: 'minigames' was not started
[16:17:50 WARN] [simpleautomessages]: Messages for 'any-other-section' is not specified or empty
[16:17:50 WARN] [simpleautomessages]: 'any-other-section' was not started
[16:17:50 INFO] [simpleautomessages]: Done
[16:17:51 INFO] [Snap]: Loaded plugin SpigotWebFramework version 1.0 by SteffTek
[16:17:51 INFO] [AntiBungeePluginSteal]: Loading config...
[16:17:51 INFO] [Snap]: Loaded plugin AntiBungeePluginSteal version 1.0.3 by jaqobb
[16:17:51 INFO]: [SWF] Loaded Web-Templates:
[16:17:51 INFO]: BASIC by SteffTek
[16:17:51 INFO]: SIDEBAR by SteffTek
[16:17:51 INFO] [Snap]: Enabled plugin SpigotWebFramework version 1.0 by SteffTek
[16:17:51 INFO] [AntiBungeePluginSteal]: Registering listeners...
[16:17:51 INFO] [AntiBungeePluginSteal]: Starting metrics...
[16:17:51 INFO] [Snap]: Enabled plugin AntiBungeePluginSteal version 1.0.3 by jaqobb
[16:17:51 INFO] [snap]: Loaded 2 plugins!
[16:17:51 INFO]: [TAB] If you experience tablist prefix/suffix not working and global playerlist duplicating players, toggle "use-online-uuid-in-tablist" option in config.yml (set it to opposite value).
[16:17:51 INFO]: [TAB] File plugins\TAB\errors.log exists and is not empty. Take a look at the error messages and try to resolve them. After you do, delete the file.
[16:17:52 INFO]: [TAB] There was 1 startup warning.
[16:17:52 INFO]: [TAB] Enabled in 91ms
[16:17:52 INFO] [viaversion]: Loading 1.12 -> 1.13 mappings...
[16:17:52 INFO] [viaversion]: Loading 1.13 -> 1.13.2 mappings...
[16:17:52 INFO] [viaversion]: Loading 1.13.2 -> 1.14 mappings...
[16:17:52 INFO] [viaversion]: Loading 1.16 -> 1.16.2 mappings...
[16:17:52 INFO] [viaversion]: Loading block connection mappings ...
[16:17:52 INFO] [viaversion]: Loading 1.14 -> 1.15 mappings...
[16:17:52 INFO] [viaversion]: Loading 1.15 -> 1.16 mappings...
[16:17:52 WARN]: The server channel initializer has been replaced by java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[16:17:52 WARN]: The backend channel initializer has been replaced by java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[16:17:52 INFO] [viabackwards]: Loading translations...
[16:17:52 INFO] [viabackwards]: Registering protocols...
[16:17:53 INFO] [viaversion]: Loading 1.13 -> 1.12 mappings...
[16:17:53 INFO] [viaversion]: Loading 1.13.2 -> 1.13 mappings...
[16:17:53 INFO] [viaversion]: Loading 1.14 -> 1.13.2 mappings...
[16:17:53 INFO] [viaversion]: Loading 1.15 -> 1.14 mappings...
[16:17:53 INFO] [viaversion]: Loading 1.16 -> 1.15 mappings...
[16:17:53 INFO] [viaversion]: Loading 1.16.2 -> 1.16 mappings...
[16:17:53 INFO] [viaversion]: ViaVersion detected server version: 1.7-1.7.5(4)
[16:17:53 INFO] [viaversion]: Finished mapping loading, shutting down loader executor!
[16:17:53 INFO]: Listening on /0:0:0:0:0:0:0:0:25597
[16:17:53 INFO]: Done (20,36s)!

What other programs/plugins are you running?

Full log explains

What is happening?

[16:17:59 ERROR]: #1:

java.lang.ClassCastException: class net.md_5.bungee.connection.LoginResult$Property cannot be cast to class com.velocitypowered.api.util.GameProfile$Property (net.md_5.bungee.connection.LoginResult$Property is in unnamed module of loader com.velocitypowered.proxy.plugin.PluginClassLoader @3f49e266; com.velocitypowered.api.util.GameProfile$Property is in unnamed module of loader 'app')
        at skinsrestorer.velocity.utils.SkinApplier.updateProfileSkin(SkinApplier.java:27) ~[?:?]
        at skinsrestorer.velocity.listener.GameProfileRequest.onGameProfileRequest(GameProfileRequest.java:48) ~[?:?]
        at net.kyori.event.asm.generated.f7eb527a56.GameProfileRequest-onGameProfileRequest-GameProfileRequestEvent-39.invoke(Unknown Source) ~[?:?]
        at net.kyori.event.method.SimpleMethodSubscriptionAdapter$MethodEventSubscriber.invoke(SimpleMethodSubscriptionAdapter.java:148) ~[velocity-1.1.4.jar:1.1.4]
        at net.kyori.event.SimpleEventBus.post(SimpleEventBus.java:107) ~[velocity-1.1.4.jar:1.1.4]
        at com.velocitypowered.proxy.plugin.VelocityEventManager.fireEvent(VelocityEventManager.java:137) ~[velocity-1.1.4.jar:1.1.4]
        at com.velocitypowered.proxy.plugin.VelocityEventManager.lambda$fire$1(VelocityEventManager.java:119) ~[velocity-1.1.4.jar:1.1.4]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]

AFTER I USE SKIN COMMAND IT GIVES ME THIS ERROR

[16:18:06 ERROR]:       at skinsrestorer.velocity.utils.SkinApplier.applySkin(SkinApplier.java:55)
[16:18:06 ERROR]:       at skinsrestorer.velocity.command.SkinCommand.lambda$setSkin$3(SkinCommand.java:217)
[16:18:06 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[16:18:06 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[16:18:06 ERROR]:       at java.base/java.lang.Thread.run(Thread.java:834)

What did you expect to happen?

Skinrestorer should work immediately, it works but i gotta disconnect and reconnect from server.

Additional context

IMPORTANT: When I don't use snap plugin skinrestorer(velocity) works flawlessly...

Phoenix616 commented 3 years ago

Can you please provide the full error when you run the command and test without any other plugin.

bugram commented 3 years ago
[06:38:10 ERROR]: Some errors occurred whilst posting event GameProfileRequestEvent{username=bugra, gameProfile=null}.
[06:38:10 ERROR]: #1:

java.lang.ClassCastException: class net.md_5.bungee.connection.LoginResult$Property cannot be cast to class com.velocitypowered.api.util.GameProfile$Property (net.md_5.bungee.connection.LoginResult$Property is in unnamed module of loader com.velocitypowered.proxy.plugin.PluginClassLoader @2881ad47; com.velocitypowered.api.util.GameProfile$Property is in unnamed module of loader 'app')
        at skinsrestorer.velocity.utils.SkinApplier.updateProfileSkin(SkinApplier.java:27) ~[?:?]
        at skinsrestorer.velocity.listener.GameProfileRequest.onGameProfileRequest(GameProfileRequest.java:48) ~[?:?]
        at net.kyori.event.asm.generated.1b20f6a84b.GameProfileRequest-onGameProfileRequest-GameProfileRequestEvent-4.invoke(Unknown Source) ~[?:?]
        at net.kyori.event.method.SimpleMethodSubscriptionAdapter$MethodEventSubscriber.invoke(SimpleMethodSubscriptionAdapter.java:148) ~[velocity-1.1.4.jar:1.1.4]
        at net.kyori.event.SimpleEventBus.post(SimpleEventBus.java:107) ~[velocity-1.1.4.jar:1.1.4]
        at com.velocitypowered.proxy.plugin.VelocityEventManager.fireEvent(VelocityEventManager.java:137) ~[velocity-1.1.4.jar:1.1.4]
        at com.velocitypowered.proxy.plugin.VelocityEventManager.lambda$fire$1(VelocityEventManager.java:119) ~[velocity-1.1.4.jar:1.1.4]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
[06:38:10 INFO]: [connected player] bugra (/192.168.0.20:64901) has connected
[06:38:10 INFO]: [server connection] bugra -> main has connected
[06:38:19 ERROR]: java.lang.ClassCastException: class net.md_5.bungee.connection.LoginResult$Property cannot be cast to class com.velocitypowered.api.util.GameProfile$Property (net.md_5.bungee.connection.LoginResult$Property is in unnamed module of loader com.velocitypowered.proxy.plugin.PluginClassLoader @2881ad47; com.velocitypowered.api.util.GameProfile$Property is in unnamed module of loader 'app')
[06:38:19 ERROR]:       at skinsrestorer.velocity.utils.SkinApplier.applySkin(SkinApplier.java:55)
[06:38:19 ERROR]:       at skinsrestorer.velocity.command.SkinCommand.lambda$setSkin$3(SkinCommand.java:217)
[06:38:19 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[06:38:19 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[06:38:19 ERROR]:       at java.base/java.lang.Thread.run(Thread.java:834)

It only happens when I use snap u can test it also with skinrestorer.

Phoenix616 commented 3 years ago

Does this happen with the latest version of SkinsRestorer too? (14)

bugram commented 3 years ago

problem solved with latest snapshot skinrestorer (Build #297) non-snapshot Skinrestorer still having some troubles sorry for inconvenience... thanks

AlexProgrammerDE commented 3 years ago

Just wanted to clarify what happened here. Skinsrestorer already has built in velocity support. So there is no reason for snap. Secondly I think we are performing class.forname checks and so skinsrestorer assumed you were using velocity, but only found bungeecord api as you were using snap. Just use the out-of-the-box velocity support next time. 👍🏻

bugram commented 3 years ago

Just wanted to clarify what happened here. Skinsrestorer already has built in velocity support. So there is no reason for snap. Secondly I think we are performing class.forname checks and so skinsrestorer assumed you were using velocity, but only found bungeecord api as you were using snap. Just use the out-of-the-box velocity support next time. 👍🏻

snap was not for skinrestorer it was for antibungeesteal but it made errors with skinrestorer so dev-release solved problem. If i put it in snap folder i gotta say skinrestorer(bungee) and dev-release wont solve the problem.