galnir / Master-Bot

A Discord music bot and dashboard with slash commands, playlist support, Spotify, music quiz, saved playlists, lyrics, gifs and more
MIT License
464 stars 373 forks source link

Crash when attempting to play song #779

Closed DraTrav closed 1 year ago

DraTrav commented 1 year ago

IMPORTANT : DO NOT SKIP THIS STEPS AND DO NOT DELETE THEM. WE CAN NOT HELP YOU IF YOU DO NOT PROVIDE INFORMATION AND STEPS TO REPRODUCE

Do not open an issue if you simply "copied" code over to your bot/another bot. This is absolutely not recommended and will cause bugs. Also do not open an issue if you modified code and added features and now it's not working right. This is because I can't figure it out and don't have the time to read your code and find out what you did wrong.

Describe the bug The bot crashes when I attempt to play a song

To Reproduce attempt to play a youtube link bot crashes and exits with code 1

Expected behavior A clear and concise description of what you expected to happen.

The song to play

Screenshots If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

Additional context I attempted it with several version of java as well as node version with no luck

Bacon-Fixation commented 1 year ago

Howdy DraTrav,

i also ran into this error last night, I am working on a solution. Just a heads-up, it may take a little while to resolve, so bare with me a bit. seems the framework needs to be updated.

Much Love -Bacon

Bacon-Fixation commented 1 year ago

Howdy again @DraTrav check out PR #780, should get you running while updates are being made

after cloning the PR i would recommend running npm ci in terminal, before doing the npm run dev

Much Love -Bacon

DraTrav commented 1 year ago

That did fix the crashing and playing problem. However the songs are not skippable and it just says "Error: command chat input DiscordAPIError: Unknown Message" when attempting to run /skip

image

The media control box is also not created when a song is played.

Bacon-Fixation commented 1 year ago

i would try running npm ci then the npm run dev,

also I'm having a hard time replicating this error, could you send a copy of the log file

there is a log file that is created in the /Master-Bot/packages/bot/logs folder (or /Master-Bot/logs for docker users) it may have another error message that came with the unknown message

im curious what version of the dependencies you have, you can use the /bot-status command in a discord channel and click the next button to see the versions that its running,

i quickly setup a Debain 11 install of the bot and used Nodejs v16.8.2 and v19.8.1, and both seem to work for me here is my dependency list
image

Much Love -Bacon

DraTrav commented 1 year ago

Here is my list of dependencies

image

Here is my log file you requested this is after it errored out after /skip Master-Bot-04-03-2023.log

image
DraTrav commented 1 year ago

npm ci was used before npm run dev each time.

I did update my node to the latest 19.8.1. Still no luck and the same problem

image

Master-Bot-04-03-2023.log

Bacon-Fixation commented 1 year ago

Thank you my friend, forgive me if I keep repeating some stuff :D, just haven't been able to replicate either error Client or Command Chat Input, Try running npm run clean-i (should delete all the node_modules folders and do a regular npm i to install them)

if the npm run clean-i fails to run, you can delete the following folders manually /Master-Bot/node_modules /Master-Bot/packages/bot/node_modules then run npm i to reinstall them and try starting the bot again with npm run dev

Much Love -Bacon

DraTrav commented 1 year ago

That did not solve my problem however I figured it out!

something apparently happened with redis, the service was running during my attempts so whatever happened I have no clue. rebooting redis didn't help, however, a full removal and reinstall of redis did.