Closed aeonian007 closed 2 years ago
Thanks for the bug reports. I've hopefully fixed most of the issues you outlined, but the bug 2 will not be fixed since YouTube uses https instead of http. Http shouldn't be used. Try the latest version and let me know what isn't fixed
Bug 1 is fixed, and Bug 3 is partially fixed. Bug 3 no longer happens if I run the bot on the same server as the volcano (which means the bot connects to localhost). However, it still shows the same behavior if the bot connects to the volcano server other than localhost (other IP addresses than localhost). This was tested with the latest version of PM2 (https://www.npmjs.com/package/pm2) and erela.js. Please let me know if I need to provide more information. Thank you!
I cannot reproduce bug 3 with the provided info.
The volcano was hosted at CentOS 9 Stream with the latest version of pm2. The bot was hosted on my computer, which is Windows 11 with the latest version of erela.js and the current LTS of NodeJS. I am not sure if this specific behavior only happens in a particular condition. Were you able to reproduce Bug 3 before the fix was implemented? If not, I will test on a few more OS and versions.
I was not able to reproduce bug 3 prior. Both the bot and the node I used are hosted in the same datacenter but not in the same vps. The stats on the readme for Volcano are my machines
May I ask you which process manager you used to host the volcano? I think it might be a pm2 problem since it only happened when I hosted the volcano on my VPS.
while true; node Volcano; sleep 1; end
I guess I should mention that's a linux only command. I don't use any process managers and Volcano is safe enough to run outside of a loop
I tested without using pm2, but it still happens. I will continue investigating if this is a machine/environment issue or volcano issue. Please let me know if you find something new. Thank you!
There is an incomplete solution for bug 3:
const preventDuplicate = new Map();
// TrackStart Event
if (preventDuplicate.get(player.guild)) {
return preventDuplicate.delete(player.guild);
} else {
preventDuplicate.set(player.guild, true);
setTimeout(() => {
preventDuplicate.delete(player.guild);
}, 5 * 1000);
}
// Code
Adding this at the beginning of the TrackStart event will prevent the player from getting two TrackStart events. Use this if anyone is experiencing the same issue as me.
Thank you for the fix for bug 1.
Bug 3 cannot be fixed as you have provided. I will be exploring why this happens if I can reliably reproduce it and try to come up with a solution when I am not dealing with back to back irl situations. Updates regarding this will be posted on this issue, but I will leave it closed as I have mentioned before that I cannot reproduce
Here are some bugs I identified using Volcano.
Test Environment - Windows 11, NodeJS v16.15.0 (Current LTS) Package - erela.js (https://www.npmjs.com/package/erela.js)
Compiled TypeScript code using “tsc -p .” command.
Bug 1: TrackStart event is emitted when I resume a player. When I pause and resume, the TrackStart event is emitted. I am not sure if this is the intended behavior. If it is, please let me know.
Bug 2: Volcano does not take URLs starting with “http.” I tested this with “http://youtu.be/QsgJNYzlA9U”. Volcano showed the error “Error: This is not a YouTube Watch URL.”
Bug 3: TrackStart event is emitted twice when I use a custom URL as a source. “Custom URL” means “http” source defined in application.yml. Tested with “https://cdn.discordapp.com/attachments/952028033550811230/975214329521651783/Creo_-_Sphere_Low_Pitch.mp3” (This will be downloaded if you click this link. Feel free to use other audio files to test if you do not prefer downloading this.)
I am truly enjoying your project. I love how the Volcano uses 100-200MB of memory, whereas the Lavalink uses 500-1000MB. Thank you for your hard work. Have a nice day!