amsam0 / voicechat-discord

A mod and plugin to make a bridge between Simple Voice Chat and Discord to allow for players without the mod to hear and speak.
https://modrinth.com/mod/simple-voice-chat-discord-bridge
MIT License
24 stars 7 forks source link

musl (alpine) linux is not supported #68

Open Darsh19756 opened 2 months ago

Darsh19756 commented 2 months ago

Edit by @amsam0: please see https://github.com/amsam0/voicechat-discord/issues/68#issuecomment-2346778929


Whenever the plugin is registered, it causes an error saying it could not load natives for linux-x64. it also gives the line is it (up to date?) while I am using the latest version of both SIMPLE VOICE CHAT DISCORD BRIDGE and simple voice chat. I was using version 1.21 and I am using falixnodes for hosting my server and using paper as the platform

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Falixnodes'
  2. Make a server
  3. Make a paper server for 1.21
  4. upload the plugins(simple voice chat bridge and simple voice chat)
  5. start the server
  6. check the council
  7. see the error

Expected behavior it should give the error (could not load natives for Linux-x64) and a bunch of redlines with it

Logs [08:35:54 ERROR]: [voicechat-discord] Failed to load natives: Could not load voicechat_discord natives for linux-x64 [08:35:54 ERROR]: Error occurred while enabling voicechat-discord v3.0.5 (Is it up to date?) java.lang.RuntimeException: java.lang.Exception: Could not load voicechat_discord natives for linux-x64 at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.Core.enable(Core.java:44) ~[voicechat-discord-paper-3.0.5 (1).jar:?] at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.PaperPlugin.onEnable(PaperPlugin.java:79) ~[voicechat-discord-paper-3.0.5 (1).jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.21.jar:1.21-130-b1b5d4c] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.21.jar:1.21-130-b1b5d4c] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:640) ~[paper-1.21.jar:1.21-130-b1b5d4c] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:589) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:754) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:516) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:329) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1215) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-130-b1b5d4c] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: java.lang.Exception: Could not load voicechat_discord natives for linux-x64 at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.LibraryLoader.load(LibraryLoader.java:116) ~[voicechat-discord-paper-3.0.5 (1).jar:?] at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.Core.enable(Core.java:41) ~[voicechat-discord-paper-3.0.5 (1).jar:?] ... 13 more Caused by: java.lang.UnsatisfiedLinkError: /tmp/voicechat_discord-c21000a7831b10b477a8ceeb9c36f081/libvoicechat_discord.so: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /tmp/voicechat_discord-c21000a7831b10b477a8ceeb9c36f081/libvoicechat_discord.so) at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) ~[?:?] at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331) ~[?:?] at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197) ~[?:?] at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139) ~[?:?] at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418) ~[?:?] at java.base/java.lang.Runtime.load0(Runtime.java:852) ~[?:?] at java.base/java.lang.System.load(System.java:2025) ~[?:?] at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.LibraryLoader.load(LibraryLoader.java:114) ~[voicechat-discord-paper-3.0.5 (1).jar:?] at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.Core.enable(Core.java:41) ~[voicechat-discord-paper-3.0.5 (1).jar:?] ... 13 more [08:35:54 INFO]: [voicechat-discord] Disabling voicechat-discord v3.0.5 [08:35:54 INFO]: [voicechat-discord] Shutting down 0 bots [08:35:54 INFO]: [voicechat-discord] Successfully shutdown 0 bots [08:35:54 ERROR]: Error occurred while disabling voicechat-discord v3.0.5 java.lang.UnsatisfiedLinkError: 'void dev.amsam0.voicechatdiscord.Core.shutdownNatives()' at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.Core.shutdownNatives(Native Method) ~[voicechat-discord-paper-3.0.5 (1).jar:?] at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.Core.disable(Core.java:60) ~[voicechat-discord-paper-3.0.5 (1).jar:?] at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.PaperPlugin.onDisable(PaperPlugin.java:91) ~[voicechat-discord-paper-3.0.5 (1).jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:291) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:237) ~[paper-1.21.jar:1.21-130-b1b5d4c] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugin(PaperPluginManagerImpl.java:114) ~[paper-1.21.jar:1.21-130-b1b5d4c] at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:550) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:206) ~[paper-1.21.jar:1.21-130-b1b5d4c] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.21.jar:1.21-130-b1b5d4c] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:640) ~[paper-1.21.jar:1.21-130-b1b5d4c] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:589) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:754) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:516) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:329) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1215) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-130-b1b5d4c] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] [08:35:54 INFO]: [spark] Starting background profiler... 08:35:55 INFO: Done preparing level "world" (9.293s) 08:35:55 INFO: Running delayed init tasks

[Falix Panel]: Server is online. 08:35:55 INFO: Timings Reset 08:35:55 INFO: [voicechat] Loading plugins 08:35:55 INFO: [voicechat] Loaded 1 plugin(s) 08:35:55 INFO: [voicechat] Initializing plugins [08:35:55 ERROR]: [voicechat] Failed to initialize plugin 'voicechat-discord' java.lang.IllegalStateException: zip file closed at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:846) ~[?:?] at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:338) ~[?:?] at java.base/java.util.jar.JarFile.getEntry(JarFile.java:516) ~[?:?] at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:471) ~[?:?] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:209) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593) ~[?:?] at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:169) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?] at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.VoicechatPlugin.initialize(VoicechatPlugin.java:19) ~[voicechat-discord-paper-3.0.5 (1).jar:?] at voicechat-bukkit-2.5.20.jar/de.maxhenkel.voicechat.plugins.PluginManager.init(PluginManager.java:40) ~[voicechat-bukkit-2.5.20.jar:?] at voicechat-bukkit-2.5.20.jar/de.maxhenkel.voicechat.Voicechat.lambda$onEnable$0(Voicechat.java:128) ~[voicechat-bukkit-2.5.20.jar:?] at voicechat-bukkit-2.5.20.jar/de.maxhenkel.voicechat.compatibility.BaseCompatibility.lambda$runTask$0(BaseCompatibility.java:32) ~[voicechat-bukkit-2.5.20.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler$GlobalScheduledTask.run(FoliaGlobalRegionScheduler.java:179) ~[paper-1.21.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler.tick(FoliaGlobalRegionScheduler.java:37) ~[paper-1.21.jar:?] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1729) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:473) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1598) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1304) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-130-b1b5d4c] at java.base/java.lang.Thread.run(Thread.java:1583) ~?:?: [voicechat] Initialized 1 plugin(s) 08:35:55 INFO: [voicechat] Registering events for 'voicechat-discord' [08:35:55 ERROR]: [voicechat] Failed to register events for 'voicechat-discord' java.lang.IllegalStateException: zip file closed at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:846) ~[?:?] at java.base/java.util.zip.ZipFile.getEntry(ZipFile.java:338) ~[?:?] at java.base/java.util.jar.JarFile.getEntry(JarFile.java:516) ~[?:?] at java.base/java.util.jar.JarFile.getJarEntry(JarFile.java:471) ~[?:?] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:209) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593) ~[?:?] at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:169) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:164) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?] at voicechat-discord-paper-3.0.5 (1).jar/dev.amsam0.voicechatdiscord.VoicechatPlugin.registerEvents(VoicechatPlugin.java:25) ~[voicechat-discord-paper-3.0.5 (1).jar:?] at voicechat-bukkit-2.5.20.jar/de.maxhenkel.voicechat.plugins.PluginManager.gatherEvents(PluginManager.java:56) ~[voicechat-bukkit-2.5.20.jar:?] at voicechat-bukkit-2.5.20.jar/de.maxhenkel.voicechat.plugins.PluginManager.init(PluginManager.java:46) ~[voicechat-bukkit-2.5.20.jar:?] at voicechat-bukkit-2.5.20.jar/de.maxhenkel.voicechat.Voicechat.lambda$onEnable$0(Voicechat.java:128) ~[voicechat-bukkit-2.5.20.jar:?] at voicechat-bukkit-2.5.20.jar/de.maxhenkel.voicechat.compatibility.BaseCompatibility.lambda$runTask$0(BaseCompatibility.java:32) ~[voicechat-bukkit-2.5.20.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler$GlobalScheduledTask.run(FoliaGlobalRegionScheduler.java:179) ~[paper-1.21.jar:?] at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler.tick(FoliaGlobalRegionScheduler.java:37) ~[paper-1.21.jar:?] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1729) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:473) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1598) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1304) ~[paper-1.21.jar:1.21-130-b1b5d4c] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-130-b1b5d4c] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Versions (please complete the following information):

Additional context it just says that it could not load for Linux and asks if it is up to date

amsam0 commented 2 months ago

Duplicate of #63 which is itself a duplicate of #54. Please contact your hosting provider asking if they can update the system your server is running on. If that doesn't work, I might be able to look into more fixes.

Darsh19756 commented 2 months ago

Well, I managed to get in contact with someone on their team. They are asking what version they need.

amsam0 commented 2 months ago

This addon requires a semi modern version of glibc, which typically you have to upgrade the whole system to upgrade.

Darsh1975 commented 2 months ago

Hey sorry to bother but they are asking for the specific version the addon needs.

amsam0 commented 2 months ago

I think 2.29 or later

Darsh1975 commented 2 months ago

Hey they are asking about alpine.

Darsh1975 commented 2 months ago

Screenshot_20240912-131104_Discord

Darsh1975 commented 2 months ago

They are saying that that there system uses musl

Darsh1975 commented 2 months ago

Screenshot_20240912-144603_Discord

amsam0 commented 2 months ago

Yes, I know what alpine is, that explains the error message more. A separate build of the plugin will be needed. I will try to do this sometime in the next week

Side note, I have no idea why they are using alpine since that just seems like an absolute pain for generally very little gain. I'm honestly surprised you aren't having issues with more plugins

Darsh1975 commented 2 months ago

Well you can try to make musl builds next weeks but one more problem. They banned me from using falix(not actually) and its for their own good I guess. They said that the country I am from is not provided in there services for free that means that my country is blacklisted on their free plan list and only allows paid servers. They said that the revenue they got from my country is very low and that is why they do not provide free service there. So I am searching for new hosts now. They said that vpn is not allowed which I was using and never knew that it was banned. Also because they have no vpn detection I could use there services but I thought that i should some other. But you should make the builds I guess that they could come in handy for someone else

amsam0 commented 2 months ago

I doubt it. I'll leave this issue open for now. If anyone else needs musl/alpine Linux support, please comment and I'll add it

Darsh1975 commented 2 months ago

If you can suggest me some free hosts that provide enough ram like falix and multiple ports for a server then please tell me because I am searching for a free server hosting for me and my friends to play in.

amsam0 commented 2 months ago

I can't help you with that, sorry. If you need a good server, you're going to have to pay. Also, a GitHub issue for a mod you happen to be using is definitely not the place to ask about this

Kladki commented 2 weeks ago

Building for musl just requires you to build the plugin on a musl system. I have done so below if anyone needs it, but it would be better if it is wanted to be done officially, since I could potentially inject malware into the builds.

(Link removed by @amsam0 due to malware risk - please make a comment if you need a musl build)

amsam0 commented 2 weeks ago

I have previously attempted building on musl but ran into issues. My attempt: https://github.com/amsam0/voicechat-discord/commit/8dc2e4e99c2007a6af1553410610ade1aa84745e The errors: https://github.com/amsam0/voicechat-discord/actions/runs/10201730415 Getting CI to work is painful and time consuming. Since the user didn't even need it, I gave up. Do you need musl builds? If so, I will look into this again

Kladki commented 2 weeks ago

No, I don't need musl builds, as I don't even use this plugin (but I do use Alpine on my servers). I was just looking at this project as I am looking into how to bridge VOIP across different platforms/protocols.