No music playback on arch linux.

Hey I'm on a arch linux pc, and when I try to do playback of an url the bot just joins the voice channel, goes into Playing Status, and after like 100ms it goes back to idle. The thing is the exact same code works perfectly fine on my debian server. I tried searching in the web and also asked GPT, but after 3 hours of no result I'm asking here.
11 Replies
d.js toolkit
d.js toolkitā€¢2w ago
- What are your intents? GuildVoiceStates is required to receive voice data! - Show what dependencies you are using -- generateDependencyReport() is exported from @discordjs/voice. - Try looking at common examples: https://github.com/discordjs/voice-examples. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Basti šŸ”®šŸ›”
My Intents are: Guilds, GuildVoiceStates and GuildMembers 1s
Core Dependencies
- @discordjs/voice: 0.18.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: 0.9.0
- opusscript: 0.0.8

Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.15
- @stablelib/xchacha20poly1305: not found
- @noble/ciphers: not found

FFmpeg
- version: 6.0-static https://johnvansickle.com/ffmpeg/
- libopus: yes
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.18.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: 0.9.0
- opusscript: 0.0.8

Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.15
- @stablelib/xchacha20poly1305: not found
- @noble/ciphers: not found

FFmpeg
- version: 6.0-static https://johnvansickle.com/ffmpeg/
- libopus: yes
--------------------------------------------------
@discordjs/opus is detected? I tried installing it before but the installation of it failed during the build process, so I just switched to opusscript Welp I cant remove it tho as pnpm says its not installed :/ Ah I got it removed by deleting node modules, lemme try rq Welp nope
Core Dependencies
- @discordjs/voice: 0.18.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: not found
- opusscript: 0.1.1

Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.15
- @stablelib/xchacha20poly1305: not found
- @noble/ciphers: not found

FFmpeg
- version: 6.0-static https://johnvansickle.com/ffmpeg/
- libopus: yes
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.18.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: not found
- opusscript: 0.1.1

Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.15
- @stablelib/xchacha20poly1305: not found
- @noble/ciphers: not found

FFmpeg
- version: 6.0-static https://johnvansickle.com/ffmpeg/
- libopus: yes
--------------------------------------------------
Lemme grab the code Play cmd https://haste.luax.xyz/oyihuyicam.typescript musicHandler https://haste.luax.xyz/pelacejuyo.typescript If you want the code raw in discord just tell me And when I run the play cmd it just says Playback started, and directly after it says Playback idle Uh I've been playing mp3 stream urls for like years now My oldest bot that still supports playing urls, is even on djs/voice 0.16 Sure -------------------------------------------------- Core Dependencies - @discordjs/voice: 0.18.0 - prism-media: 1.3.5 Opus Libraries - @discordjs/opus: not found - opusscript: 0.0.8 Encryption Libraries - sodium-native: not found - sodium: not found - libsodium-wrappers: 0.7.10 - @stablelib/xchacha20poly1305: not found - @noble/ciphers: not found FFmpeg - version: 6.0-static https://johnvansickle.com/ffmpeg/ - libopus: yes -------------------------------------------------- Thats of the bot I shared the src from, which works on my server lemme grab one of the other bot root@v2202105150054154803:/home/gka# node musicBot.js -------------------------------------------------- Core Dependencies - @discordjs/voice: 0.16.0 - prism-media: 1.3.5 Opus Libraries - @discordjs/opus: 0.9.0 - opusscript: 0.0.8 Encryption Libraries - sodium-native: not found - sodium: not found - libsodium-wrappers: 0.7.11 - tweetnacl: 0.14.5 FFmpeg - version: 5.0.1-static https://johnvansickle.com/ffmpeg/ - libopus: yes -------------------------------------------------- what the I just uploaded the bot from my pc to the server Thats the 2nd bot that has been running for idk 2 years now uuh ooh I have installed node 18.15 there And node 23.6.0 on my local machine (even tried with 20.18.1) hmm on my pc latest opusscript is 0.1.1 and on the server its 0.0.8 So with node version 18.15.0 on my pc (same the server is on), and opusscript downgraded to 0.0.8 it does the same report of my pc rn
Core Dependencies
- @discordjs/voice: 0.18.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: not found
- opusscript: 0.0.8

Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.15
- @stablelib/xchacha20poly1305: not found
- @noble/ciphers: not found

FFmpeg
- version: 6.0-static https://johnvansickle.com/ffmpeg/
- libopus: yes
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.18.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: not found
- opusscript: 0.0.8

Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.15
- @stablelib/xchacha20poly1305: not found
- @noble/ciphers: not found

FFmpeg
- version: 6.0-static https://johnvansickle.com/ffmpeg/
- libopus: yes
--------------------------------------------------
I mean it instantly goes back to idle When I specify a file path it works tho. And I also tried pre-fetching and streaming the audio then. that works aswell, but only with non-stream mp3s But I quite need that ability you mean my pc? Cuz my pc is on arch which its not working on Sry for the missdeclaration. my pc is on arch, my server on debian And I'm playing the stream through vlc player rn And that works perfectly fine I did start the stream just now after I did stop the bot I even tried with a mp3 file that is hosted on my server Not even that works hmm not that I know of I'm connected via my normal internet. yup ā•°ā”€ curl https://gkaapi.luax.xyz/audio/10428332738 Warning: Binary output can mess up your terminal. Use "--output -" to tell curl to output it to your terminal anyway, or consider Warning: "--output <FILE>" to save to a file. with the stream it just exits after 533ms ā•­ā”€ī‚² ļŒ¢ ī‚° ļ¼ ~ ī‚° ī‚² 533ms ļ‰’ ī‚² 23 ī‚² 21:38:03 ļ€— ī‚°ā”€ā•® ā•°ā”€ curl https://streams.ilovemusic.de/iloveradio29.mp3 I swap them out every 2 tries So I try the streams one, and then the gka Well when I put the gka one as the link it does the same as the ilovemusic one
Basti šŸ”®šŸ›”
well with curl I can download the gka one atleast šŸ˜… But if I put the gka one as link, then it wont play asw I just turned on debug mode, and this is what gets logged.
state change:
from {"status":"idle","resource":false,"stepTimeout":false}
to {"status":"buffering","resource":true,"stepTimeout":false}
Playback started
state change:
from {"status":"buffering","resource":true,"stepTimeout":false}
to {"status":"playing","missedFrames":0,"playbackDuration":0,"resource":true,"stepTimeout":false}
Playback idle
state change:
from {"status":"playing","missedFrames":0,"playbackDuration":120,"resource":true,"stepTimeout":false}
to {"status":"idle","resource":false,"stepTimeout":false}
state change:
from {"status":"idle","resource":false,"stepTimeout":false}
to {"status":"buffering","resource":true,"stepTimeout":false}
Playback started
state change:
from {"status":"buffering","resource":true,"stepTimeout":false}
to {"status":"playing","missedFrames":0,"playbackDuration":0,"resource":true,"stepTimeout":false}
Playback idle
state change:
from {"status":"playing","missedFrames":0,"playbackDuration":120,"resource":true,"stepTimeout":false}
to {"status":"idle","resource":false,"stepTimeout":false}
When I play the file that I downloaded via file it shows this.
from {"status":"idle","resource":false,"stepTimeout":false}
to {"status":"buffering","resource":true,"stepTimeout":false}
Playback started
state change:
from {"status":"buffering","resource":true,"stepTimeout":false}
to {"status":"playing","missedFrames":0,"playbackDuration":0,"resource":true,"stepTimeout":false}
from {"status":"idle","resource":false,"stepTimeout":false}
to {"status":"buffering","resource":true,"stepTimeout":false}
Playback started
state change:
from {"status":"buffering","resource":true,"stepTimeout":false}
to {"status":"playing","missedFrames":0,"playbackDuration":0,"resource":true,"stepTimeout":false}
welp, I tbh have no idea why its doing that Exact same thing happens on the debian server it works on also, idk why but when I do the gka url with node-fetch then it works fine. so idk. if anyone has any idea on how I could maybe fix it please reply and ping me
WhiteGarfield
WhiteGarfieldā€¢6d ago
hey, i have the same problem but instead of Arch its Ubuntu on my side which does not like to work as it should.... have you found something to workaround?
Basti šŸ”®šŸ›”
Sadly not.
WhiteGarfield
WhiteGarfieldā€¢6d ago
damn I was finally able to get my bot running.. do you use ffmpeg-static? If so remove it. This module if used on newer Linux and ffmpeg versions the module makes problems cause it's binaries are only up to ffmpeg version 6.0.0 everything above 6.0.0 will NOT work. Only way to make it work is to install only newest ffmpeg (sudo apt ffmpeg) and get rid of ffmpeg-static completely. You can give this a try
Basti šŸ”®šŸ›”
Tysm.. It rly works
WhiteGarfield
WhiteGarfieldā€¢5d ago
wonderfull! glad to help
Bon
Bonā€¢2d ago
Was encountering this issue - where my Raspberry Pi would not be able to stream some remote audio files - due to ffmpeg-static. Removing the ffmpeg-static npm package and installing ffmpeg itself on the machine was enough to fix the issue. Thank you for helping me figure out what was wrong through this post!
WhiteGarfield
WhiteGarfieldā€¢2d ago
no problem. one hand cleans the other one šŸ˜‰

Did you find this page helpful?