Repulser / Moosic

Host your own 24/7 Discord Music Bot!
135 stars 48 forks source link

Hosting Moosic on a Raspberry Pi #38

Open MonsieurPapillon opened 4 years ago

MonsieurPapillon commented 4 years ago

Hi there ! I'm trying to host Moosic on my own Raspberry Pi, but I'm failing to make the bot actually play music. I've got two kinds of errors ; one for YouTube playing, and one for local file playing.

As you will see, the bot sucessuflly connects to the server and to the channel, but fail to play the songs.

I'm guessing I'm missing some libraries since it's a pretty light-weigth Raspbian system I've installed on the Raspberry. Does anyone have an idea what I'm missing ?

Cheers and thx in advance.

YouTube link error :

Loaded! ----
[ ERROR] [LocalAudioTrackExecutor] Error in playback of ----
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something broke when playing the track.
        at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:43)
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:102)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:349)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException: null
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.decodeUrlEncodedItems(YoutubeAudioTrack.java:321)
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.loadTrackFormatsFromStreamingData(YoutubeAudioTrack.java:210)
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.loadTrackFormats(YoutubeAudioTrack.java:135)
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.loadBestFormatWithUrl(YoutubeAudioTrack.java:98)
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.process(YoutubeAudioTrack.java:62)
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:90)
        ... 4 common frames omitted

And for a local file :

[ INFO ] [NativeLibraryLoader] Native library libmpg123-0: loading with filter com.sedmelluq.discord.lavaplayer.natives.ConnectorNativeLibLoader$$Lambda$87/31614840@10f0548
[ INFO ] [NativeLibraryLoader] Native library connector: loading with filter null
[ ERROR] [NativeLibraryLoader] Native library {}: loading failed.
java.lang.UnsatisfiedLinkError: Required library was not found
        at com.sedmelluq.lava.common.natives.NativeLibraryLoader.extractLibraryFromResources(NativeLibraryLoader.java:128)
        at com.sedmelluq.lava.common.natives.NativeLibraryLoader.loadInternal(NativeLibraryLoader.java:113)
        at com.sedmelluq.lava.common.natives.NativeLibraryLoader.loadAndRemember(NativeLibraryLoader.java:85)
        at com.sedmelluq.lava.common.natives.NativeLibraryLoader.load(NativeLibraryLoader.java:70)
        at com.sedmelluq.discord.lavaplayer.natives.ConnectorNativeLibLoader.loadConnectorLibrary(ConnectorNativeLibLoader.java:21)
        at com.sedmelluq.discord.lavaplayer.natives.mp3.Mp3DecoderLibrary.getInstance(Mp3DecoderLibrary.java:14)
        at com.sedmelluq.discord.lavaplayer.natives.mp3.Mp3Decoder.<init>(Mp3Decoder.java:25)
        at com.sedmelluq.discord.lavaplayer.container.mp3.Mp3TrackProvider.<init>(Mp3TrackProvider.java:66)
        at com.sedmelluq.discord.lavaplayer.container.mp3.Mp3ContainerProbe.probe(Mp3ContainerProbe.java:54)
        at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.checkContainer(MediaContainerDetection.java:91)
        at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.detectContainer(MediaContainerDetection.java:76)
        at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.detectContainer(MediaContainerDetection.java:58)
        at com.sedmelluq.discord.lavaplayer.source.local.LocalAudioSourceManager.detectContainerForFile(LocalAudioSourceManager.java:62)
        at com.sedmelluq.discord.lavaplayer.source.local.LocalAudioSourceManager.loadItem(LocalAudioSourceManager.java:45)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:437)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:419)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:218)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
[ ERROR] [DefaultAudioPlayerManager] Error in loading item /home/pi/discordServer/moosicBot/a.mp3
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something went wrong when looking up the track
        at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:43)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.dispatchItemLoadFailure(DefaultAudioPlayerManager.java:237)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:226)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsatisfiedLinkError: com.sedmelluq.discord.lavaplayer.natives.mp3.Mp3DecoderLibrary.create()J
        at com.sedmelluq.discord.lavaplayer.natives.mp3.Mp3DecoderLibrary.create(Native Method)
        at com.sedmelluq.discord.lavaplayer.natives.mp3.Mp3Decoder.<init>(Mp3Decoder.java:26)
        at com.sedmelluq.discord.lavaplayer.container.mp3.Mp3TrackProvider.<init>(Mp3TrackProvider.java:66)
        at com.sedmelluq.discord.lavaplayer.container.mp3.Mp3ContainerProbe.probe(Mp3ContainerProbe.java:54)
        at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.checkContainer(MediaContainerDetection.java:91)
        at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.detectContainer(MediaContainerDetection.java:76)
        at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.detectContainer(MediaContainerDetection.java:58)
        at com.sedmelluq.discord.lavaplayer.source.local.LocalAudioSourceManager.detectContainerForFile(LocalAudioSourceManager.java:62)
        at com.sedmelluq.discord.lavaplayer.source.local.LocalAudioSourceManager.loadItem(LocalAudioSourceManager.java:45)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:437)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:419)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:218)
        ... 4 common frames omitted
java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: com.sedmelluq.discord.lavaplayer.natives.mp3.Mp3DecoderLibrary.create()J
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at co.moosic.music.TrackScheduler.parsePlaylist(TrackScheduler.java:95)
        at co.moosic.music.TrackScheduler.proccessTracks(TrackScheduler.java:49)
        at co.moosic.music.TrackScheduler.<init>(TrackScheduler.java:39)
        at co.moosic.music.Login.main(Login.java:68)
Caused by: java.lang.UnsatisfiedLinkError: com.sedmelluq.discord.lavaplayer.natives.mp3.Mp3DecoderLibrary.create()J
        at com.sedmelluq.discord.lavaplayer.natives.mp3.Mp3DecoderLibrary.create(Native Method)
        at com.sedmelluq.discord.lavaplayer.natives.mp3.Mp3Decoder.<init>(Mp3Decoder.java:26)
        at com.sedmelluq.discord.lavaplayer.container.mp3.Mp3TrackProvider.<init>(Mp3TrackProvider.java:66)
        at com.sedmelluq.discord.lavaplayer.container.mp3.Mp3ContainerProbe.probe(Mp3ContainerProbe.java:54)
        at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.checkContainer(MediaContainerDetection.java:91)
        at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.detectContainer(MediaContainerDetection.java:76)
        at com.sedmelluq.discord.lavaplayer.container.MediaContainerDetection.detectContainer(MediaContainerDetection.java:58)
        at com.sedmelluq.discord.lavaplayer.source.local.LocalAudioSourceManager.detectContainerForFile(LocalAudioSourceManager.java:62)
        at com.sedmelluq.discord.lavaplayer.source.local.LocalAudioSourceManager.loadItem(LocalAudioSourceManager.java:45)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:437)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:419)
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:218)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
No supported songs found!
Repulser commented 4 years ago

Hey, moosic unfortunately isn't supported on raspberry pi at the moment due to missing natives.

MonsieurPapillon commented 4 years ago

Okay that's what I though, missing native libraries. Thanks anyways, I'll keep checking in and good luck ;)

uncraftablecrep commented 4 years ago

with windows on raspberry worproject.ml you can emulate 32 bit programs