Androz2091 / discord-player

🎧 Complete framework to simplify the implementation of music commands using discord.js v14
https://discord-player.js.org/
MIT License
590 stars 192 forks source link

[CRITICAL] Player won't play music #1295

Closed tonyG433 closed 1 year ago

tonyG433 commented 2 years ago

Describe the bug Player won't play music, might be an issue with the queueing

Expected behavior Obviously play music as it usually doss

Please complete the following information:

Additional context I'd also like to adress the instability of this package. There is always something that breaks. Why? There are tons of bots that rely discord-player, some of them even being big. This isn't really something that should happen to such a big module, and especially its core feature.

Olebeh commented 2 years ago

Same. Bot cannot find any music using link. I don't know if it's discord-player's problem or ytdl. If you try to find music using text, everything works

xWass commented 2 years ago

also facing this issue. cant play any music at all, was able to yesterday. seems to be a ytdl error image

revot334 commented 2 years ago

hey all... update this is just a YouTube problem because SoundCloud is working my best guess would be YouTube is starting to implement features to prevent YouTube videos being scraped off there platform.

twlite commented 2 years ago

Yes this seems to be an issue with ytdl-core. Can you try play-dl and see if it works?

revot334 commented 2 years ago

why did this just pop now

xSaoul commented 2 years ago

Yes this seems to be an issue with ytdl-core. Can you try play-dl and see if it works?

I used play-dl and the moment it fired the playing event the bot left and didn't play anything.

twlite commented 2 years ago

Additional context I'd also like to adress the instability of this package. There is always something that breaks. Why? There are tons of bots that rely discord-player, some of them even being big. This isn't really something that should happen to such a big module, and especially its core feature.

@tonyG433 I'm sorry for that. Talking about the instability, we are not a full time developer working on discord-player. It's hard to allocate time for the development of this lib due to a lot of reasons. This indeed includes managing time for pull requests. We dont have time to verify and make sure the update works and so on. This not only applies to me but to Androz as well. We are trying our best to allocate time for this lib. We're sorry for the late updates.

The lib isnt dead. I am active these days, usually after 7 PM (GMT +05:45). If anything needs to be done, you can contact me. I am available at Androz's discord server. For the time being, I am willing to update/review incoming pull requests.

twlite commented 2 years ago

According to https://github.com/fent/node-ytdl-core/issues/1108, downgrading ytdl-core to v4.9.1 works. Can you try this?

xSaoul commented 2 years ago

According to fent/node-ytdl-core#1108, downgrading ytdl-core to v4.9.1 works. Can you try this?

This works!

revot334 commented 2 years ago

According to https://github.com/fent/node-ytdl-core/issues/1108, downgrading ytdl-core to v4.9.1 works. Can you try this?

Can you push this to the package if it works it would really help open source projects using this

MatchaOnMuffins commented 2 years ago

According to fent/node-ytdl-core#1108, downgrading ytdl-core to v4.9.1 works. Can you try this?

Can you push this to the package if it works it would really help open source projects using this

1296 I just made a pr that changed the version to 4.9.1 :)

Xyvraaq commented 2 years ago

According to fent/node-ytdl-core#1108, downgrading ytdl-core to v4.9.1 works. Can you try this?

it doesn't work for me, why

xSaoul commented 2 years ago

According to fent/node-ytdl-core#1108, downgrading ytdl-core to v4.9.1 works. Can you try this?

it doesn't work for me, why

It does just not for YouTube links, please read previous comments and PR

twlite commented 2 years ago

According to fent/node-ytdl-core#1108, downgrading ytdl-core to v4.9.1 works. Can you try this?

Can you push this to the package if it works it would really help open source projects using this

This needs more investigation. I can't simply downgrade ytdl-core as it may break something else. The known issue currently (after downgrading) is bot immediately disconnects after joining the voice channel.

revot334 commented 2 years ago

According to fent/node-ytdl-core#1108, downgrading ytdl-core to v4.9.1 works. Can you try this?

Can you push this to the package if it works it would really help open source projects using this

This needs more investigation. I can't simply downgrade ytdl-core as it may break something else. The known issue currently (after downgrading) is bot immediately disconnects after joining the voice channel.

Totally understand just trying to get the bot I maintain back up so people can enjoy music

Tksharmely commented 2 years ago

Downgrading ytdl-core to 4.9.1 works for now. I hope ytdl-core coders push a new update with a full fix. npm uninstall ytdl-core npm install ytdl-core@4.9.1 then run the bot.

Tksharmely commented 2 years ago

Update: 4.9.1 is now depacryted for YouTube links but it plays SoundCloud and Spotify. Using ytdl-core 4.9.2 for YouTube links working for now.

xSaoul commented 2 years ago

Update: 4.9.1 is now depacryted for YouTube links but it plays SoundCloud and Spotify. Using ytdl-core 4.9.2 for YouTube links working for now.

Good catch, working for me as well. Hopefully a true solution is found on ytdl's side.

revot334 commented 2 years ago

Do you guys know if they are working on a solution?

MatchaOnMuffins commented 2 years ago

Do you guys know if they are working on a solution?

https://github.com/fent/node-ytdl-core/issues/1108#issuecomment-1213594910 I think the issue has been fixed apparently, the latest version is working again

revot334 commented 2 years ago

Do you guys know if they are working on a solution?

https://github.com/fent/node-ytdl-core/issues/1108#issuecomment-1213594910

I think the issue has been fixed

apparently, the latest version is working again

I will give it a shot

revot334 commented 2 years ago

yes it works

revot334 commented 2 years ago

version 4.11.0 of ytdl core seems to work at least with my bot

Tksharmely commented 2 years ago

version 4.11.0 of ytdl core seems to work at least with my bot

Can you share your npm ls please? I want to see which modules you are using with.

tonyG433 commented 2 years ago

In conclusion, use play-dl and don't care about stability further :)

Olebeh commented 2 years ago

am i the only who still has problems with it, even though everyone says that 4.11.0 works for them?

twlite commented 2 years ago

If you have any ytdl fork that works, try using it with onBeforeCreateStream

xWass commented 2 years ago

4.11.0 is not a working version of ytdl. you can try 4.10.0 or 4.9.1. Besides that, you can uninstall ytdl-core and reinstall using this command: npm i ytdl-core@https://github.com/GreepTheSheep/node-ytdl-core

Olebeh commented 2 years ago

The hosting I'm using is installing packages manually from package.json file, one of the packages is of course discord-player which has ytdl-core 4.11.0 version specified. What do i do in this case?

xSaoul commented 2 years ago

The hosting I'm using is installing packages manually from package.json file, one of the packages is of course discord-player which has ytdl-core 4.11.0 version specified. What do i do in this case?

Add "ytdl-core": "4.10.0" to your package.json and delete the node_modules folder and package-lock.json so they reinstall assuming they install on launch.

xWass commented 2 years ago

The hosting I'm using is installing packages manually from package.json file, one of the packages is of course discord-player which has ytdl-core 4.11.0 version specified. What do i do in this case?

Add "ytdl-core": "4.10.0" to your package.json and delete the node_modules folder and package-lock.json so they reinstall assuming they install on launch.

this seems unnecessary. just npm uninstall ytdl-core npm install ytdl-core@4.10.0

this is not a valid fix for everyones issue, and i believe this will work for those people npm uninstall ytdl-core npm install ytdl-core@https://github.com/GreepTheSheep/node-ytdl-core

xSaoul commented 2 years ago

The hosting I'm using is installing packages manually from package.json file, one of the packages is of course discord-player which has ytdl-core 4.11.0 version specified. What do i do in this case?

Add "ytdl-core": "4.10.0" to your package.json and delete the node_modules folder and package-lock.json so they reinstall assuming they install on launch.

this seems unnecessary. just npm uninstall ytdl-core npm install ytdl-core@4.10.0

this is not a valid fix for everyones issue, and i believe this will work for those people npm uninstall ytdl-core npm install ytdl-core@https://github.com/GreepTheSheep/node-ytdl-core

Not if their panel doesn't allow commands... Thats why I said "assuming they install on launch"

xWass commented 2 years ago

good point considering half the people using this lib host on repl.it. another fix for this issue is using play-dl instead of ytdl-core.

Olebeh commented 2 years ago

good point considering half the people using this lib host on repl.it. another fix for this issue is using play-dl instead of ytdl-core.

Can you explain how have you done track searching with play dl?

retrouser955 commented 2 years ago

The hosting I'm using is installing packages manually from package.json file, one of the packages is of course discord-player which has ytdl-core 4.11.0 version specified. What do i do in this case?

Add "ytdl-core": "4.10.0" to your package.json and delete the node_modules folder and package-lock.json so they reinstall assuming they install on launch.

this seems unnecessary. just npm uninstall ytdl-core npm install ytdl-core@4.10.0 this is not a valid fix for everyones issue, and i believe this will work for those people npm uninstall ytdl-core npm install ytdl-core@https://github.com/GreepTheSheep/node-ytdl-core

Not if their panel doesn't allow commands... Thats why I said "assuming they install on launch"

You can use node child process like


const { exec } = require('node:child_process')
exec('your command here')
// use execSync to wait until the command finish running
retrouser955 commented 2 years ago

For people hosting on repl.it, you can paste this script in replit.nix to get python running in a Node JS repl (To install @discordjs/opus)

{ pkgs }: {
  deps = [
    pkgs.nodejs-16_x
    pkgs.nodePackages.typescript-language-server
    pkgs.nodePackages.yarn
    pkgs.replitPackages.jest
    pkgs.python38Full
    pkgs.ffmpeg
    pkgs.libuuid
  ];
  env = {
     LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [pkgs.libuuid];
  };
}