https://discord.gg/botpress logo
#🤝help
Huge differences between the emulator and production
# 🤝help
b

bulky-dusk-45106

06/09/2023, 10:29 AM
Hey ! I just deployed my bot on Teams, and this is the first time I test the bot outside of the studio, I won't lie it has been a pretty disapointing experience for now. First the bot's behavior inside the emulator and inside Teams were not the same, and some weird unexpected bugs appeared (Capture cards police is bold and big, flow aren't followed properly, something cards are played multiple times for no reasons.) So I decided that I would test it all out and try to correct the problems, but now I face a bigger problem. While the bot runs fine on the emulator, once I try it on Teams (or the Botpress chat) it timeout VERY often, so often that I can't get to the end of a conversation. This is the error in the logs everytime: "Task timed out after 60.10 seconds" Does anybody know why there is such a difference between the emulator and prod ? It is quite disheartening to think that the bot I built works well inside the studio but is useless in prod, I hope this is some exceptional problem because if everytime I test the bot inside the emulator it doesn't translate in production it will be quite the loss of time. Thanks for any insight !
a

acceptable-kangaroo-64719

06/09/2023, 10:46 AM
Hey @bulky-dusk-45106, sorry to hear about all the problems with the teams integration. Could you tell us a bit more about the specific problems you're running into? You mentioned so far: * Unexpected text formatting * Unexpected flow behavior * Repeated messages * 60 second timeout on conversations
b

bulky-dusk-45106

06/09/2023, 11:59 AM
It's a bit hard to talk to you about the specific problems because I encountered most of them yesterday and today I can't test it because of the timeout error. But the main surprise I had was that the bot's outputs were quite different from the emulator. One thing I remember is that I have an AiTask that receive the user's question, it then decide wether it returns an answer, or if the question is out of the scope of the bot and returns OOS instead. In the emulator, when the task return OOS, it triggers a transition to some message and close the conversation. The weird thing that only happened inside Teams, is that no matter if the user asked an OOS question or not, the bot would both answer the question AND inside its answer say that the user is OOS (which is not supposed to happen, the bot is supposed to either give an answer or return OOS), and never trigger the OOS transition. I tried to see if this behavior could be replicated inside the emulator but without success, this only appeared inside teams.
I imagined that following its integration, Teams would be simply consuming the bot service, that's why I don't really understand how there can be such massive differences between the two environments.
a

acceptable-kangaroo-64719

06/09/2023, 12:02 PM
that's really interesting! You're right that Teams is simply consuming the bot service. Are you using any user data in your AI tasks? The data might have a different format between web chat and Teams that might be causing different behaviors
b

bulky-dusk-45106

06/09/2023, 12:03 PM
That' the only theory I had, but all the data the bot is using is either inputed inside the chat, or are configuration variables that I double checked are the same
a

acceptable-kangaroo-64719

06/09/2023, 12:05 PM
is there anything strange turning up in the bot logs?
b

bulky-dusk-45106

06/09/2023, 12:08 PM
Well there is the timeout error, besides that I just went to look a the logs and they disapeared. I end up on the No recent logs found page
a

acceptable-kangaroo-64719

06/09/2023, 12:11 PM
when you talk to the bot on teams, are there any other strange logs besides the timeout error?
b

bulky-dusk-45106

06/09/2023, 12:15 PM
I don't remember seeing any other one, but I can't verify that
Well here is an update, I just tested it to see if I could see anything weird in the logs, and after changing nothing to the bot I managed to run a full conversation without getting timed out and without getting weird behaviors
a

acceptable-kangaroo-64719

06/09/2023, 12:21 PM
That's good news!
b

bulky-dusk-45106

06/09/2023, 12:22 PM
Ok I may have a theory for the timeout, I just changed a variable value, and republished the bot. And now I am getting timed out again. So I guess there may be some delay to use the bot, after publishing it again
a

acceptable-kangaroo-64719

06/09/2023, 12:24 PM
that's an interesting theory! I don't know enough about the inner workings of the Teams integration to give you anything definitive. But maybe there's a delay period between when you publish the bot on Botpress and when it updates on MS Teams?
b

bulky-dusk-45106

06/09/2023, 12:24 PM
Yeah I think something like that is happening
a

acceptable-kangaroo-64719

06/09/2023, 12:26 PM
alright, I'll touch base with one of the engineers when they're awak and see if that is plausable
b

bulky-dusk-45106

06/09/2023, 12:28 PM
Awesome, thanks
Update: Things that happen only on Teams: - Capture cards font is big and bold - My first capture card plays twice instead of only once at the very begining of the conversation after the user's first message
Here is the difference for the same bot with Teams first then on the Botpress chat
a

acceptable-kangaroo-64719

06/09/2023, 1:03 PM
could you also share a screenshot of your bot's flow?
s

square-ability-27191

06/11/2023, 2:55 AM
ì have a opensource solution also, same issues. trying botpress to fix some bugs in our repository. maybe together the solution occurs.
b

bulky-dusk-45106

06/12/2023, 6:19 AM
Here's the entire flow of the bot
I hope the screeshots are clear enough
Update: I tried the bot again this morning, and it seems to work fine. I think the problem is some delay between the moment I publish the bot and the moment it is completly updated. The weird thing is that instead of simply giving an error like "Migration incomplete/in progress", the bot seemingly "works" but badly and with weird behaviors.
TLDR: Waiting long enough after publishing the bot seem to solve everything (except capture cards big font)
I have no idea how the publishing works, but it would be nice to have some informations about it. For example how much time does it take for the bot to become fully operationnal instead. Until the bot is deployed it's just annoying, but once the bot is deployed in prod we need to know how much time the bot will be out each time we make an update.
15 Views