owlbear-rodeo / kenku-fm

Online tabletop audio sharing for Discord
https://www.kenku.fm
GNU General Public License v3.0
201 stars 36 forks source link

Bot sporadically disconnects from voice channels #36

Closed moondownr closed 1 year ago

moondownr commented 2 years ago

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:

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):

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

rafaspadilha commented 2 years ago

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.

mitchemmc commented 2 years ago

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.

rnicks commented 2 years ago

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.

jbhaywood commented 2 years ago

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.

r-valyar commented 2 years ago

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.

Tim98345 commented 2 years ago

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 !

ghost commented 1 year ago

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.

mitchemmc commented 1 year ago

We've changed the internal discord library we use in v1.2.0 which should better handle reconnecting.

I'll close this for now but if it still happens with this new library comment here and I'll look more into the issue.

Tim98345 commented 1 year ago

I ran a game without issues. Thanks so much for addressing this !