Closed Alphaegen closed 1 year ago
There are no errors:
What permissions does the bot need?
This is the error if I try to run it using the beta branch:
This is the error if I try to run it using the beta branch:
That does fix that specific error, but the bot still joins and doesn't play anything.
Uninstall ffmpeg static and remove it from node-modules https://github.com/Androz2091/discord-player/issues/1639#issuecomment-1477466885 https://github.com/Androz2091/discord-player/issues/1639#issuecomment-1477793093
Removed ffmpeg-static from package.json, removed package-lock.json and reinstalled node modules. The node_modules folder doesn't contain ffmpeg-static anymore, but it's still doing the same. No music and the queue instantly gets cleared. Any way to debug this the way the person did in the thread you sent above?
Removed ffmpeg-static from package.json, removed package-lock.json and reinstalled node modules. The node_modules folder doesn't contain ffmpeg-static anymore, but it's still doing the same. No music and the queue instantly gets cleared. Any way to debug this the way the person did in the thread you sent above?
what is your discord-player version?
I've got these versions:
Someone said missing these could be the problem, but I've got them enabled:
Hey buddy! Try removing ffmpeg-static and run sudo snap install ffmpeg
on the /* folder. This was my fix, try doing the same thing. It should work.
Forgot to mention i'm running the beta branch
I've got these versions:
could you show me your package.json
?
You are missing @discord-player/extractor
package. Oh, just realized, you are using discord-player 5.x, which is outdated. Switch to v6.x
Hey buddy! Try removing ffmpeg-static and run
sudo snap install ffmpeg
on the /* folder. This was my fix, try doing the same thing. It should work.
I'm afraid I've already uninstalled ffmpeg-static and installed ffmpeg with sudo apt install ffmpeg
.
Hey buddy! Try removing ffmpeg-static and run
sudo snap install ffmpeg
on the /* folder. This was my fix, try doing the same thing. It should work.I'm afraid I've already uninstalled ffmpeg-static and installed ffmpeg with
sudo apt install ffmpeg
.
Same here! When adding a filter to the song, the songs stops playing.(on the beta branch)
Removed ffmpeg-static from package.json, removed package-lock.json and reinstalled node modules. The node_modules folder doesn't contain ffmpeg-static anymore, but it's still doing the same. No music and the queue instantly gets cleared. Any way to debug this the way the person did in the thread you sent above?
The debug logs from the mentioned thread is from discord-player v6. v5 logs are not that great/useful. Plus all the versions below 6.0.0 are deprecated. Could you try the beta
branch instead?
I'm now on the beta branch and am now running into the following error. Should I remove ffmpeg-static from package.json again to fix this?
const error = new Error("Could not extract stream for this track");
^
Error: Could not extract stream for this track
at GuildQueuePlayerNode.play (/home/server/ngmusicbot/node_modules/discord-player/dist/index.js:985:23)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.execute (/home/server/ngmusicbot/commands/music/play.js:59:33)```
I'm now on the beta branch and am now running into the following error:
const error = new Error("Could not extract stream for this track"); ^ Error: Could not extract stream for this track at GuildQueuePlayerNode.play (/home/server/ngmusicbot/node_modules/discord-player/dist/index.js:985:23) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Object.execute (/home/server/ngmusicbot/commands/music/play.js:59:33)```
I've removed ffmpeg-static from node_modules but not from package.json file.
Removing ffmpeg-static
doesn't seem to fix this problem.
Removing
ffmpeg-static
doesn't seem to fix this problem.
That's odd. Here, at my end, it worked..
Did you install ffmpeg with snap? Do not install all the modules with npm, use yarn.
The yarn install
command should be ran after downloading the beta branch. yarn is working better with package management, as for npm installs all the packages mentioned in package-lock.json file.
Completely removing package-lock.json
and node_modules
, then reinstalling everything with yarn
seems to have fixed it. The lyrics
button does seem to fail with this error, but everything else works.
Error for lyrics:
throw er; // Unhandled 'error' event
^
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at SongsClient.<anonymous> (/home/server/ngmusicbot/node_modules/genius-lyrics/dist/songs/client.js:47:37)
at Generator.next (<anonymous>)
at fulfilled (/home/server/ngmusicbot/node_modules/genius-lyrics/dist/songs/client.js:5:58)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.```
Completely removing
package-lock.json
andnode_modules
, then reinstalling everything withyarn
seems to have fixed it. Thelyrics
button does seem to fail with this error, but everything else works.Error for lyrics:
throw er; // Unhandled 'error' event ^ SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at SongsClient.<anonymous> (/home/server/ngmusicbot/node_modules/genius-lyrics/dist/songs/client.js:47:37) at Generator.next (<anonymous>) at fulfilled (/home/server/ngmusicbot/node_modules/genius-lyrics/dist/songs/client.js:5:58) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:394:10) at processTicksAndRejections (node:internal/process/task_queues:85:21) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.```
The command for lyrics is fully launched, my bad. I got used with the old branch. I suggest not using it, as the lyrics that get looked up get searched on the Genius website, a website that provides lyrics for your wished track. Apparently, lyrics work here in my end but that is odd. You shouldn't have removed package-lock file, you should've just left it there. Remove node_modules folder, along with yarn.lock file, add back the package-lock.json file from the archive you've downloaded from the beta branch, then use yarn install
again.
This should work.
The package-lock
file only gets generated when running npm install
. It's not a file that's kept within the Git repo. Is there a specific archive I can download with the beta branch + package-lock I've missed?
The
package-lock
file only gets generated when runningnpm install
. It's not a file that's kept within the Git repo. Is there a specific archive I can download with the beta branch + package-lock I've missed?
I am sorry. Yes, there is no package-lock. only if you run npm install
, I am kind of unfocused. Have you removed the node_modules folder and used yarn install
command?
Yes, I've done exactly that 👍 The music plays now, but the lyrics function still gives an error.
Yes, I've done exactly that 👍 The music plays now, but the lyrics function still gives an error.
That is odd. Mine is fully functional.. Make sure you are on the latest update of the branch or try downloading the lyrics files from the beta branch, from music subfolder of the commands folder from the main folder and from buttons subfolder of the src folder from the branch. Import them in the correct folders and try running it again.
Let me know if it works!
Yes, I've done exactly that 👍 The music plays now, but the lyrics function still gives an error.
have you tried bumping genius-lyrics?
Haven't but I've simply removed the button locally for now. It's not something we're planning on using soon. @skdhg I am wondering tho, why hasn't the ffmpeg-static
package been removed from the package.json if it doesn't work?
This is fixed for now. I'm closing this issue.
The bot does join, but it doesn't play anything and the queue is immediately cleared. The bot is deafened, but that might be normal. I've got ffmpeg installed:
My node version is 16.20.0.