TannDev/silence-among-us

Bot ends lobbies for inactivity during active games

Closed this issue ยท 16 comments

Bug Report

The bot will end a lobby stating "Nothing has happened 30 minutes, so I ended the lobby." despite the lobby being actively in use for a game. Bot automatically unmutes everyone when it occurs, proceeds to mute everyone as per usual after a state change in the game. Attempting to use "!sau stop" to close the lobby after this bug appears has the bot say "There's not a lobby for your voice channel. Try !sau start!"

Steps to Reproduce

Play games with the bot running alongside Among Us Capture.
Eventually (Feels like it might be around the 30 minute mark but not confirmed) bot will claim to close the lobby.

Expected behavior

Bot should detect the game as still running and not end lobby

Screenshots

https://imgur.com/a/350CUOK

I think the 30 minute limit is too short. I'll double it in the next version.

But are you saying that it still responds to game commands after it's supposedly ended the lobby for inactivity?

Also, are you using AmongUsCapture, or running it manually?

Hrm. Any updates from the capture should be resetting the 30-minute timer as well.

What's even more strange is that it can still manage the lobby after it's stopped. The lobby shouldn't even exist anymore for it to be updating it. But it would seem that it's only half deleted.

I've noticed some other strange behavior too, so I think I need to re-evaluate how lobbies are stored, loaded, and updated. (Unfortunately, I wasn't able to replicate this myself. My group played for several hours without encountering it.)

I have the same problem, after 30 minutes, the bot stop the lobby but unmute mute when someonedead or call an emergencycall.

I think the bot don't reset the timer when we use AmongUsCapture

I think the bot don't reset the timer when we use AmongUsCapture

It's weirder than that. Because the lobby shouldn't still work after it's been timed out. It shouldn't be accepting updates from the bot either.

I know that and if I try !sau stop it answers "There"s not a lobby..."

If I continue to play another game the bot continues to close the lobby again after a certain time.

And again and again. I can't "stop" and if I start a new lobby I have the same situation after some minutes.

It's like the bot stacks the same lobby after updates (dead, emergencycall, etc) and close all lobbys after x time

So far, I've confirmed a couple things:

  • The lobby IS destroyed by the timeout. (So that needs to be longer.)
  • Destroyed lobbies are removed from lobbiesByVoiceChannel and the backup database.
  • Destroyed lobbies are not removed from lobbiesByConnectCode, because the socket is still able to update it.

For example, this is what happens if I let my lobby timeout and then change my color:
image

This issue is resolved in version 2.3.0

Heads up, seems like it hasn't been fully resolved as we just had it happen again in our game.

https://imgur.com/a/j4EUbvT

Hrm. Can you use !sau version for me?

(FYI: you can paste images directly into Github comments. No need for Imgur.)

Oh, didn't even realise I could directly comment a photo.
The bot reports version 2.5.2

I've had two lobbies running in parallel for the last 5+ hours, with no issues. Are you sure this is still occurring?

(I did recently fix a bug in which a stopped lobby would post in Discord that it had timed out, about an hour after it was stopped.)

Unless somewhere in between 2.3.0 and now you've fixed this issue again, it definitely still occurs.

That last screenshot I sent shows the bot ending the lobby, the bot updating the same lobby moments later and then me trying to use '!sau lobby' to double check if the same issue occurred. The exact same behaviour showed up as before the first fix.

For what it's worth, we were playing for about 5 hours last night and had the issue pop up twice, which is significantly less frequent than it was happening before

I'm still not able to replicate this at all, unfortunately.

If you encounter it again, can you give me an exact (as possible) time when it happened? (Make sure to include a timezone).
I'll also need your Discord server ID.

Sure can. I havent actually had a chance to play since it last popped up, but if I encounter it again I'll give you all the info I can.