[Bug] Bots don't receive the messages

Since the recent update bots are in a weird limbo. They won’t receive any messages (room or direct) unless they are forced to move to another room. It might be related to them not appearing on the room counter either (making bot leave the room resets the pop to -1). It’s strange that it affects the private messages to, but idk.

Restarting the bot doesn’t help and the bug persists. For librarian, the bot got fixed when force moved to another room, for scam I had to put it to sleep and wake up a couple times until it started receiving the messages again.

1 Like

Yes and yes.

It is not that I had changed anything. But the fact that the update to v1.48.0 included a restart of the service re-triggered the bug.

I found the bug, which was that currently controlled bots were not included in the initialization process when the service rebooted. Meaning, the following things did not happen for bots:

  • They were not included when counting characters in rooms, causing the -1 room count bug once they were put asleep.
  • They did were not included when subscribing to events, causing the bug you described of them not receiving events
  • Their autosleep timers were not started, causing them to stay awake forever even if no script were running and pinging.

So. Three bugs in one!
I will do a hot-fix to get rid of it later on.

Restarting the script should not help. But putting it asleep and then waking it up again should do the trick.

2 Likes

This should be resolved in my patch release I just did. But it might require restart of the bot scripts, in case they cannot handle the temporary disconnect.

Also, we are now using:

  • Traefik v2.10
  • NATS server v2.9
  • Go 1.20.6
  • … and some more version upgrades.
1 Like