DiscordSRV

DiscordSRV

86.8k Downloads

INVOKESPECIAL/STATIC on interfaces require ASM 5

Denaris01 opened this issue ยท 17 comments

commented

Hello, i want to test the new unique playercount but the plugin don't work with thermos. I use the last thermos version Build 58: https://github.com/CyberdyneCC/Thermos/releases
I have test it whit spigot 1.7.10 only and the plugin works. It's a thermos issue. can you fix this or should i write to thermos developer?
Discord V11 works fine whit thermos Build 58. Now you have fixed the unique playercount and i cannot use it :(

[21:16:13] [Server thread/INFO]: [DiscordSRV] Enabling DiscordSRV v12.0
[21:16:14] [Server thread/INFO]: [DiscordSRV] [JDA] JDA starting...
[21:16:14] [Server thread/ERROR]: Error occurred while enabling DiscordSRV v12.0 (Is it up to date?)
java.lang.NoClassDefFoundError: com/scarsz/discordsrv/jda/managers/AccountManager
    at com.scarsz.discordsrv.jda.entities.impl.JDAImpl.login(JDAImpl.java:127) ~[?:?]
    at com.scarsz.discordsrv.jda.JDABuilder.buildAsync(JDABuilder.java:287) ~[?:?]
    at com.scarsz.discordsrv.jda.JDABuilder.buildBlocking(JDABuilder.java:308) ~[?:?]
    at com.scarsz.discordsrv.DiscordSRV.buildJda(DiscordSRV.java:592) ~[?:?]
    at com.scarsz.discordsrv.DiscordSRV.onEnable(DiscordSRV.java:196) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[JavaPlugin.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:368) [JavaPluginLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410) [SimplePluginManager.class:1.7.10-1614.58]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:438) [CraftServer.class:1.7.10-1614.58]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:372) [CraftServer.class:1.7.10-1614.58]
    at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:519) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:493) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:453) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:337) [lt.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:643) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: java.lang.ClassNotFoundException: Failed to remap class com.scarsz.discordsrv.jda.managers.AccountManager
    at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:534) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:455) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:211) ~[PluginClassLoader.class:1.7.10-1614.58]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_101]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101]
    ... 16 more
Caused by: java.lang.IllegalArgumentException: INVOKESPECIAL/STATIC on interfaces require ASM 5
    at org.objectweb.asm.MethodVisitor.visitMethodInsn(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.a(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.b(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:246) ~[JarRemapper.class:?]
    at net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:232) ~[JarRemapper.class:?]
    at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:499) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:455) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:211) ~[PluginClassLoader.class:1.7.10-1614.58]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_101]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101]
    ... 16 more
commented

Tested it now by my own and get the same problem but ist working for another one. Can you send me the output of /discord debug? Should also output something if JDA does not load.

commented

i have use the last build #42 white the same error from build #39: http://hastebin.com/tuguwicofi
the same problem are whit a clean KCauldron Server. The another user has a mac? java 7? I test it whit Windows 7, debian 8 and Java 8.

commented

If I'm allowed to intervene: Maybe it's a way to consider using ASM4 or Java 7. (I know downgrading is not a good way, but it could help finding the issue...)

commented

@Denaris01 This are the server stats (Linux + Java 8 Update 91) I get from a server it is running on since build 39.

@Kev575 The problem is that the affected part is not from DiscordSRV so we are unable to change anything.

commented

Found out why it works for him: CyberdyneCC/Thermos#498 (comment)

commented

Yes, this fix also works for me: http://hastebin.com/avakikicig And the unique playercounter works now :)
But another user, which download DiscordSRV from spigot or bukkit, dont know it. Thats not the final solution. You can make a info in the serverconsole to this fix, when the server starts like buildcraft make this.

[17:09:22] [Server thread/WARN]: ############################################
[17:09:22] [Server thread/WARN]: # #
[17:09:22] [Server thread/WARN]: # Cauldron has been detected! Please keep #
[17:09:22] [Server thread/WARN]: # in mind that BuildCraft may NOT provide #
[17:09:22] [Server thread/WARN]: # support to Cauldron users, as the mod is #
[17:09:22] [Server thread/WARN]: # primarily tested without Bukkit/Spigot's #
[17:09:22] [Server thread/WARN]: # changes to the Minecraft internals. #
[17:09:22] [Server thread/WARN]: # #
[17:09:22] [Server thread/WARN]: # Any lag caused by BuildCraft on top of #
[17:09:22] [Server thread/WARN]: # Cauldron likely arises from workarounds #
[17:09:22] [Server thread/WARN]: # which we apply to make sure BuildCraft #
[17:09:22] [Server thread/WARN]: # works properly with Cauldron installed. #
[17:09:22] [Server thread/WARN]: # #
[17:09:22] [Server thread/WARN]: # Thanks for your attention! ~ BC devs #
[17:09:22] [Server thread/WARN]: # #
[17:09:22] [Server thread/WARN]: ############################################`

commented

I've suggested including SpecialSource with DiscordSRV by a while.

commented

Adding SpecialSource will not work... ok, tested it to make sure: does not work. The goal should be an official update for Thermos. The changes regarding this problem are already implemented in the code of Thermos but compiling went wrong.

commented

Adding SpecialSource to the libs folder, and renaming, as the post of the fix does.

commented

Fixed dad02d8

commented

Realy fast replay xD
But i have test Build 39 and there is the same error. i also have setup a clean thermos server whitout mods and plugins: the same error.

[23:41:37] [Server thread/INFO]: [DiscordSRV] Enabling DiscordSRV v12.666
[23:41:37] [Server thread/INFO]: [DiscordSRV] [JDA] JDA starting...
[23:41:37] [Server thread/ERROR]: Error occurred while enabling DiscordSRV v12.666 (Is it up to date?)
java.lang.NoClassDefFoundError: com/scarsz/discordsrv/jda/managers/AccountManager
    at com.scarsz.discordsrv.jda.entities.impl.JDAImpl.login(JDAImpl.java:127) ~[?:?]
    at com.scarsz.discordsrv.jda.JDABuilder.buildAsync(JDABuilder.java:287) ~[?:?]
    at com.scarsz.discordsrv.jda.JDABuilder.buildBlocking(JDABuilder.java:308) ~[?:?]
    at com.scarsz.discordsrv.DiscordSRV.buildJda(DiscordSRV.java:592) ~[?:?]
    at com.scarsz.discordsrv.DiscordSRV.onEnable(DiscordSRV.java:196) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[JavaPlugin.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:368) [JavaPluginLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410) [SimplePluginManager.class:1.7.10-1614.58]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:438) [CraftServer.class:1.7.10-1614.58]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:372) [CraftServer.class:1.7.10-1614.58]
    at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:519) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:493) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:453) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:337) [lt.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:643) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: java.lang.ClassNotFoundException: Failed to remap class com.scarsz.discordsrv.jda.managers.AccountManager
    at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:534) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:455) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:211) ~[PluginClassLoader.class:1.7.10-1614.58]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_101]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101]
    ... 16 more
Caused by: java.lang.IllegalArgumentException: INVOKESPECIAL/STATIC on interfaces require ASM 5
    at org.objectweb.asm.MethodVisitor.visitMethodInsn(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.a(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.b(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-all-5.0.3.jar:5.0.3]
    at net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:246) ~[JarRemapper.class:?]
    at net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:232) ~[JarRemapper.class:?]
    at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:499) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:455) ~[PluginClassLoader.class:1.7.10-1614.58]
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:211) ~[PluginClassLoader.class:1.7.10-1614.58]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_101]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101]
    ... 16 more
commented

@Scarsz So what it the temporary fix for this? I'm running into this issue too but I can't really find a fix in this thread

EDIT: I tried the suggested build 12.666 but that didn't work for me either, same issue

commented

@Scarsz The issue is gone now. Any fix nowadays? (I'll be updating my modpack soon, still on v1.7.10 until then).

commented

Thermos:

The SpecialSource library included with Thermos uses ASM4.
Updating it to the latest version will fix the issue.

Instructions for updating to ASM5:
1. Navigate to the libraries\net\md-5\SpecialSource\1.7-SNAPSHOT folder of the server
2. Delete the SpecialSource-1.7-SNAPSHOT.jar jar file
3. Download SpecialSource v1.7.4 from http://central.maven.org/maven2/net/md-5/SpecialSource/1.7.4/SpecialSource-1.7.4.jar
4. Copy the jar file to the libraries\net\md-5\SpecialSource\1.7-SNAPSHOT folder
5. Rename the jar file you just copied to SpecialSource-1.7-SNAPSHOT.jar

(k)Cauldron:

The SpecialSource library included with (K)Cauldron uses ASM4.
Updating it to the latest version will fix the issue.

Instructions for updating to ASM5:
1. Navigate to the bin\net\md-5\SpecialSource\1.7-SNAPSHOT folder of the server
2. Delete the SpecialSource-1.7-SNAPSHOT.jar jar file
3. Download SpecialSource v1.7.4 from http://central.maven.org/maven2/net/md-5/SpecialSource/1.7.4/SpecialSource-1.7.4.jar
4. Copy the jar file to the bin\net\md-5\SpecialSource\1.7-SNAPSHOT folder
5. Rename the jar file you just copied to SpecialSource-1.7-SNAPSHOT.jar
commented

@Scarsz LOL, I literally just found it in issue #228 xD Thanks anyways :D