jagrosh / MusicBot

🎶 A Discord music bot that's easy to set up and run yourself!
https://jmusicbot.com
Apache License 2.0
5.36k stars 2.56k forks source link

[Bug Report] FreeBSD not working correctly #1481

Closed LucasSnatiago closed 2 months ago

LucasSnatiago commented 8 months ago

Bug Description

[18:17:39] [INFO] [JMusicBot]: Loaded config from /home/freebsd/jmusic/config.txt
[18:17:39] [WARN] [Settings]: Failed to load server settings (this is normal if no settings have been set yet): java.nio.file.NoSuchFileException: serversettings.json
[18:17:44] [INFO] [JDA]: Login Successful!
[18:17:45] [INFO] [WebSocketClient]: Connected to WebSocket
[18:17:47] [INFO] [JDA]: Finished Loading!
[18:18:01] [INFO] [NativeLibraryLoader]: Native library libmpg123-0: loading with filter com.sedmelluq.discord.lavaplayer.natives.ConnectorNativeLibLoader$$Lambda$227/744903176@16ff7bc
[18:18:01] [INFO] [NativeLibraryLoader]: Native library libmpg123-0: could not detect sytem type, but system filter is com.sedmelluq.discord.lavaplayer.natives.ConnectorNativeLibLoader$$Lambda$227/744903176@16ff7bc - assuming it does not match and skipping library.
[18:18:01] [INFO] [NativeLibraryLoader]: Native library connector: loading with filter null
[18:18:01] [ERROR] [NativeLibraryLoader]: Native library connector: loading failed.
java.lang.IllegalArgumentException: Unknown operating system: FreeBSD
    at com.sedmelluq.lava.common.natives.architecture.DefaultOperatingSystemTypes.detect(DefaultOperatingSystemTypes.java:46)
    at com.sedmelluq.lava.common.natives.architecture.SystemType.detect(SystemType.java:44)
    at com.sedmelluq.lava.common.natives.NativeLibraryLoader.detectMatchingSystemType(NativeLibraryLoader.java:180)
    at com.sedmelluq.lava.common.natives.NativeLibraryLoader.loadInternal(NativeLibraryLoader.java:100)
    at com.sedmelluq.lava.common.natives.NativeLibraryLoader.loadWithFailureCheck(NativeLibraryLoader.java:84)
    at com.sedmelluq.lava.common.natives.NativeLibraryLoader.load(NativeLibraryLoader.java:69)
    at com.sedmelluq.discord.lavaplayer.natives.ConnectorNativeLibLoader.loadConnectorLibrary(ConnectorNativeLibLoader.java:21)
    at com.sedmelluq.discord.lavaplayer.natives.aac.AacDecoderLibrary.getInstance(AacDecoderLibrary.java:13)
    at com.sedmelluq.discord.lavaplayer.natives.aac.AacDecoder.<init>(AacDecoder.java:32)
    at com.sedmelluq.discord.lavaplayer.container.common.AacPacketRouter.processInput(AacPacketRouter.java:30)
    at com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAacTrackConsumer.consume(MpegAacTrackConsumer.java:78)
    at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.fragmented.MpegFragmentedFileTrackProvider.provideFrames(MpegFragmentedFileTrackProvider.java:68)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.processSegmentStream(YoutubeMpegStreamAudioTrack.java:142)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.processNextSegment(YoutubeMpegStreamAudioTrack.java:117)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.processNextSegmentWithRetry(YoutubeMpegStreamAudioTrack.java:79)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.execute(YoutubeMpegStreamAudioTrack.java:65)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.lambda$process$0(YoutubeMpegStreamAudioTrack.java:56)
    at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:275)
    at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:249)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.process(YoutubeMpegStreamAudioTrack.java:55)
    at com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack.processDelegate(DelegatedAudioTrack.java:25)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.processStream(YoutubeAudioTrack.java:69)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.process(YoutubeAudioTrack.java:47)
    at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:104)
    at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:348)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
[18:18:01] [WARN] [NativeResourceHolder]: Should have been closed before finalization (com.sedmelluq.discord.lavaplayer.natives.aac.AacDecoder).
[18:18:01] [ERROR] [LocalAudioTrackExecutor]: Error in playback of jfKfPfyJRdk
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something went wrong when decoding the track.
    at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:44)
    at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:293)
    at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:249)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.process(YoutubeMpegStreamAudioTrack.java:55)
    at com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack.processDelegate(DelegatedAudioTrack.java:25)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.processStream(YoutubeAudioTrack.java:69)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.process(YoutubeAudioTrack.java:47)
    at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:104)
    at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:348)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
    Suppressed: com.sedmelluq.discord.lavaplayer.tools.exception.EnvironmentInformation: 
  lavaplayer.version: 1.3.78
  os.arch: aarch64
  os.name: FreeBSD
  os.version: 14.0-RELEASE
  java.vendor: OpenJDK BSD Porting Team
  java.version: 1.8.0_392
  java.runtime.version: 1.8.0_392-b08
  java.vm.version: 25.392-b08
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Unknown operating system: FreeBSD
    at com.sedmelluq.lava.common.natives.NativeLibraryLoader.loadWithFailureCheck(NativeLibraryLoader.java:88)
    at com.sedmelluq.lava.common.natives.NativeLibraryLoader.load(NativeLibraryLoader.java:69)
    at com.sedmelluq.discord.lavaplayer.natives.ConnectorNativeLibLoader.loadConnectorLibrary(ConnectorNativeLibLoader.java:21)
    at com.sedmelluq.discord.lavaplayer.natives.aac.AacDecoderLibrary.getInstance(AacDecoderLibrary.java:13)
    at com.sedmelluq.discord.lavaplayer.natives.aac.AacDecoder.<init>(AacDecoder.java:32)
    at com.sedmelluq.discord.lavaplayer.container.common.AacPacketRouter.processInput(AacPacketRouter.java:30)
    at com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAacTrackConsumer.consume(MpegAacTrackConsumer.java:78)
    at com.sedmelluq.discord.lavaplayer.container.mpeg.reader.fragmented.MpegFragmentedFileTrackProvider.provideFrames(MpegFragmentedFileTrackProvider.java:68)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.processSegmentStream(YoutubeMpegStreamAudioTrack.java:142)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.processNextSegment(YoutubeMpegStreamAudioTrack.java:117)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.processNextSegmentWithRetry(YoutubeMpegStreamAudioTrack.java:79)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.execute(YoutubeMpegStreamAudioTrack.java:65)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeMpegStreamAudioTrack.lambda$process$0(YoutubeMpegStreamAudioTrack.java:56)
    at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:275)
    ... 10 common frames omitted
Caused by: java.lang.IllegalArgumentException: Unknown operating system: FreeBSD
    at com.sedmelluq.lava.common.natives.architecture.DefaultOperatingSystemTypes.detect(DefaultOperatingSystemTypes.java:46)
    at com.sedmelluq.lava.common.natives.architecture.SystemType.detect(SystemType.java:44)
    at com.sedmelluq.lava.common.natives.NativeLibraryLoader.detectMatchingSystemType(NativeLibraryLoader.java:180)
    at com.sedmelluq.lava.common.natives.NativeLibraryLoader.loadInternal(NativeLibraryLoader.java:100)
    at com.sedmelluq.lava.common.natives.NativeLibraryLoader.loadWithFailureCheck(NativeLibraryLoader.java:84)
    ... 23 common frames omitted

Steps to Reproduce

  1. Run the bot using openjdk 1.8
  2. play https://www.youtube.com/watch?v=jfKfPfyJRdk

Expected Result

The bot should be able to run this song on both linux and FreeBSD. I tested on my ubuntu server 23.10 and works as expected!

Debug Output

System Properties:
  java.version = 1.8.0_392
  java.vm.name = OpenJDK 64-Bit Server VM
  java.vm.specification.version = 1.8
  java.runtime.name = OpenJDK Runtime Environment
  java.runtime.version = 1.8.0_392-b08
  java.specification.version = 1.8
  os.arch = aarch64
  os.name = FreeBSD

JMusicBot Information:
  Version = 0.3.9
  Owner = 163669809702240256
  Prefix = ?
  AltPrefix = null
  MaxSeconds = 0
  NPImages = false
  SongInStatus = false
  StayInChannel = false
  UseEval = false
  UpdateAlerts = true

Dependency Information:
  JDA Version = 4.4.1_353
  JDA-Utilities Version = 3.0.5
  Lavaplayer Version = 1.3.78

Runtime Information:
  Total Memory = 27
  Used Memory = 15

Discord Information:
  ID = 414806639888302080
  Guilds = 10
  Users = 2

Additional Info

No response

Checklist

LucasSnatiago commented 2 months ago

Fixed: I downloaded the wrong java version. It's perfectly working, with Java 17 for the release v0.4.3!