kenku-fm icon indicating copy to clipboard operation
kenku-fm copied to clipboard

Bot sporadically disconnects from voice channels

Open moondownr opened this issue 2 years ago • 7 comments

Sound output in the voice channel tends to cut off, with the bot staying visibly connected to the channel on Discord for a short period of time, then disconnecting.

Immediately reconnecting and/or quickly switching voice channels sometimes doesn't work either - the bot itself connects fine, but no sound is being transmitted. Usually, after 2-3 jumps, the music "catches up". Meanwhile, various errors are being displayed:

  • connection timeout
  • WebSocket was closed before the connection was established
  • Unexpected server response: 525

This behaviour seems random and tends to go away after continuously using Kenku for about 20 minutes. I.e., I tend to get a bunch of these issues early while I'm setting up for the game, and than the whole 3 hour session goes without a single disconnect.

To Reproduce Steps to reproduce the behavior:

  1. Start Kenku.fm and connect to the Discord bot
  2. Select a voice channel as an output
  3. Start playing sounds
  4. In a few minutes, sound cuts off and the bot disconnects either immediately, or after a short delay

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 1.1.0

Additional context Please see this discord.js bug report, as it pretty much describes the same problem, as far as I can tell:

moondownr avatar May 10 '22 15:05 moondownr

A similar thing happens to me (OSX), but to a lesser degree. Sometimes the bot just disconnects from the channel. Clicking on the Kenku client to connect to a chat usually solves the issue.

rafaspadilha avatar May 20 '22 13:05 rafaspadilha

Thanks for the report. I haven't been able to reproduce this on any of my machines so it will take a while to do a proper investigation. I will be pretty busy over the next 2 months on Owlbear Rodeo 2.0 so I most likely won't get to investigate until then. I will keep this thread updated though if/when I get time.

mitchemmc avatar May 21 '22 08:05 mitchemmc

I'm experiencing a similar issue on Catalina (2012 MBP) - the bot connects and plays audio just fine for maybe 10-15 minutes, then audio stops although the bot is still connected to the voice channel. If I switch KenkuFM output to local computer, audio continues to play uninterrupted, but I have to close KenkuFM and re-open it to get it to start sending audio to Discord again. This happens consistently every 10-15 minutes or so. I'll do some more testing over the next few days and try to add some more details if possible. It's possible my old Macbook just can't keep up; I was also getting some intermittent audio stuttering that I was able to resolve by closing some other applications but the main issue continues.

In case anyone is interested, as a workaround for now I'm planning to use KenkuFM outputting from the headphone output of my laptop, running into the line in of another computer hosting DiscordAudioPipe to send the Kenku audio to Discord. I'd previously been using a similar setup to route audio from QLab and it worked great, but the Kenku workflow with Stream Deck streamlines things a lot compared to QLab.

rnicks avatar May 26 '22 02:05 rnicks

I've pretty much stopped using Kenku because it just quits playing in Discord after a while. If there's a way to get debug information to you, I'm happy to help. I'd really like to use it during my game sessions.

jbhaywood avatar Jun 30 '22 01:06 jbhaywood

It happens once or twice per session every few sessions. It is not clear what is going on, I just have to re-join the channel. Running on Windows 10.

r-valyar avatar Jul 14 '22 18:07 r-valyar

Hello, I've got this same issue - its happening to me on two different computers. Unfortunate, for me this is the only thing holding this great piece of software back !

Tim98345 avatar Sep 13 '22 09:09 Tim98345

Yeah me too. I recreated the bot and added it to the server again but it still disconnects. sometimes this error pops up: "Error connecting to voice channel: 1006:"

and sometimes in Kenku it says i am not connected to the server and i have to reconnect unter the options menu.

Fengh-RPG avatar Sep 21 '22 16:09 Fengh-RPG