-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bot won't play any songs/Song ending early #1639
Comments
I have this issue too, on Ubuntu 22 like febkosq8, the bot just connects and skip to the song end, emitting the event |
Update : |
I have the same issue in which bot can't play music on Heroku when using discord-player v6 |
I can confirm this issue, tried on :
Local file was also working |
Are you guys by chance using es modules? 🤔 |
Personally no. |
I do |
1 similar comment
I do |
Same issue on It worked before on discord-player v5 (i used Androz2091 discord-music-bot directly, now I'm upgrading it to v6) |
running linux on kernel |
So it seems it's more of a linux problem than an Ubuntu specific issue. |
But not all Linux distros. debian on wsl worked fine. So does Ubuntu 20.04. |
i can't reproduce this on macOS 12.6.3 (UNIX based OS) so this is a Linux problem |
Could it be node-related? I'm still on node 16. Im happy to help troubleshooting on my system. |
Nop, working on docker image |
That's what i meant. Maybe it's an issue with older versions of node. I'm on node 16 so...
Sent from Nine<http://www.9folders.com/>
…________________________________
Da: Mylloon ***@***.***>
Inviato: domenica 12 marzo 2023 16:21
A: Androz2091/discord-player
Cc: Alessandro Losi; Comment
Oggetto: Re: [Androz2091/discord-player] Bot won't play any songs if running on some Linux distros (Issue #1639)
Could it be node-related? I'm still on node 16.
Im happy to help troubleshooting on my system.
Nop, working on docker image node:19.7.0-bullseye-slim
—
Reply to this email directly, view it on GitHub<#1639 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AACG7N2FCNXP7VG35AM2Z73W3XSXJANCNFSM6AAAAAAVPQEYXM>.
You are receiving this because you commented.Message ID: ***@***.***>
|
For me it wasn't working for the alpine version of node 19 ( |
I also had this problem on Ubuntu 22, I got it to work by running the bot in a Docker image, specifically |
Have any tempory fixes been found? Edit: Trying above Fix, Didn't Notice it 0_0 |
It didn't work for me in the node:18-alpine image. So I used node:19.7.0-bullseye-slim as @Mylloon suggested above. It works for me now without the issue. I use railway.app to host the project. Since the node version is different from the image I used, I think it is because of the node version installed in the distro that causing the problem. I don't know if that is the case just a hunch. |
It's not node related. On centos stream i've tried node 16, 18 and 19 (all with the respective latest minors) and nothing changed.
Sent from Nine<http://www.9folders.com/>
…________________________________
Da: Karthik Raj ***@***.***>
Inviato: sabato 18 marzo 2023 06:36
A: Androz2091/discord-player
Cc: Alessandro Losi; Comment
Oggetto: Re: [Androz2091/discord-player] Bot won't play any songs if running on some Linux distros (Issue #1639)
It didn't work for me in the node:18-alpine image. So I used node:19.7.0-bullseye-slim as @Mylloon<https://github.com/Mylloon> suggested above. It works for me now without the issue. I use railway.app to host the project. Since the node version is different from the image I used, I think it is because of the node version installed in the distro that causing the problem. I don't know if that is the case just a hunch.
—
Reply to this email directly, view it on GitHub<#1639 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AACG7N7GMBG5QZNXEA4DWQLW4VCXJANCNFSM6AAAAAAVPQEYXM>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Same issue here on ubuntu 22.04. Any news on this? |
I did not realize that this was an issue until I saw messages in Zerio's Discord channel.
|
I didn't tried this fix, but how that would help? |
When a player starts to play, it checks the queue and notifies that it is empty, and skips to emptyQueue event. If you remove those audioTrack(s)Add events, the code works fine. So, the solution actually uses the event path: connection -> playerStart -> audioTrackAdd/audioTracksAdd -> emptyQueue. |
if it was youtube-sr problem, it would not return search result in first place. The issue occurs at audio player, where stream just ends after 120ms playback. This could possibly be ffmpeg issue? I don't have time to look into it at the moment as im busy these days. |
I'm also going to do some testing this week. I agree with skdhg on this one. It's very possible it's a ffmpeg issue due to it having issues with the stream data. I'll update this thread if I discover anything valuable for sharing. |
Sorry, I been also buzy. I have a student group as trainers and we have developed a discord bot for taking a break and it based on a music bot. One of students uses Linux and last week a fix I mentioned earlier did worked but not on this week. We have used singleton and useMasterPlayer() in our project and code based on strictly discord-player 6.0, discord v.14, and node.js 18.15. |
I will try to investigate this issue today and let you guys know 👍 |
ConclusionThe problem seems to be static binaries of ffmpeg, pulled from Update 1:The bot seems to be working fine on WSL - Ubuntu 22.04 under following circumstances:
Update 2 (follow-up to update 1):This issue occurs upon using FFmpeg Static
Debug Log [DEBUG] Player triggered for Track {"title":"2 Phút Hơn - KAIZ Remix","reason":"normal"}
[DEBUG] state change:
from {"status":"buffering","resource":true,"stepTimeout":false}
to {"status":"playing","missedFrames":0,"playbackDuration":0,"resource":true,"stepTimeout":false}
[DEBUG] [NW] [WS] >> {"op":5,"d":{"speaking":1,"delay":0,"ssrc":746032}}
[DEBUG] [NW] [WS] >> {"op":5,"d":{"speaking":0,"delay":0,"ssrc":746032}}
[DEBUG] Track {"title":"2 Phút Hơn - KAIZ Remix","isTransitionMode":false} was marked as finished
[DEBUG] Adding track to history and emitting finish event since transition mode is disabled...
[DEBUG] No more tracks left in the queue to play and repeat mode is off, initiating #emitEnd()
[DEBUG] state change:
from {"status":"playing","missedFrames":0,"playbackDuration":120,"resource":true,"stepTimeout":false}
to {"status":"idle","resource":false,"stepTimeout":false} Update 3 (heroku buildpack ffmpeg latest)This buildpack seems to be using johnvansickle.com/ffmpeg (the same one is used by The problem seems to be static binaries of ffmpeg, pulled from |
This fixes my issue. Thanks for taking the time to look! I removed 'ffmpeg-static' from my project yesterday but didn't realize it was still in my node_modules folder (I don't do much js dev). Once I cleared it out, it started to work. I can also confirm it works with ffmpeg 6.0 but I can't recommend anyone install it since it may break something else for you. |
What is the ffmpeg version as per |
Nvm i completely removed bot files, hosted again and it worked |
Solved on centos by removing ffmpeg-static, removing package-lock.json and reinstalled all packages. Ffmpeg installed on system is version 5.x |
from discord-player v6.3x, the package ships with its own ffmpeg implementation which gives less priority to static binaries so it should work better than how it used to. You can also set |
I'm sorry, I've done everything here without it working. My buildbacks are as follow :
Here is the interesting part of my package.json {
"engines": {
"node": "18.14.2",
"npm": "9.6.7"
},
"dependencies": {
"@discord-player/extractor": "^4.4.0",
"@discordjs/opus": "^0.8.0",
"discord-player": "^6.6.1",
"discord.js": "^14.11.0",
"ms": "^3.0.0-canary.1",
"play-dl": "^1.9.6"
}
} I tried I don't think I can |
@Loadren can you try running your bot inside docker container? Pretty sure heroku supports docker |
@skdhg I've never used Docker, but I'll try it and give you feedback. |
@skdhg Docker worked! Thanks! |
Describe the bug
When I run the bot on my local Windows 11 machine, everything works fine.
But when the bot runs on Ubuntu 22, the bot will skip playing and directly go to the finish state.
I host my bot in Heroku (running on Ubuntu 22.04 stack).
This issue doesn't exist in Ubuntu 20 (As a workaround downgrading heroku stack to 20 fixes this issue).
Current list of affected Linux distro :
index.js
play.js
Attaching debug event to the player below :
Ubuntu 22.04
Result when play command is used:
The bot joins the VC and leaves in a second. It also triggers the following events in order : audioTrackAdd > playerStart > emptyQueue > disconnect.
Windows 11 22H2
Result when play command is used:
The bot joins the VC and starts to play the requested music. It also triggers the following events in order : audioTrackAdd > playerStart.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Please complete the following information:
Additional context
The only changing factor I know is the ffmpeg build being used but Heroku same buildpack on stack 20 works fine.
On Windows : https://www.gyan.dev/ffmpeg/builds/
On Heroku (Buildpack) : https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
On Ubuntu 22.04 :
sudo snap install ffmpeg
The text was updated successfully, but these errors were encountered: