Inconsistency between studio and webchat
# 🤝help
s
@plain-lifeguard-16679 , Why functions, variables, and scripts work in the studio, but whenever deployed, they fail and return errors. How can I design a bot if it works in the studio but not in webchat? The function on the screenshot is defined and works while testing, but whenever I try to interact with the bot through webchat it throws this error. https://cdn.discordapp.com/attachments/1246107376021671977/1246107376831041586/image.png?ex=665b2f6e&is=6659ddee&hm=5640ad3e5ab90ae071fd00aa5efa77078bb259cce1c728cc40562d2c506d5c1e&
f
Hey, just to be clear. Your workflow has a function as a variable?
s
Hi, it's a promise wrapper. The returned promise is wrapped by trackPromiseStatus which adds a getState method to it. It works in the studio.
It's for async execution in the background.
But the problem is deeper because the bot get's stuck and is not transitioning even though it states the transition in the logs https://cdn.discordapp.com/attachments/1246107376021671977/1246113888714620962/image.png?ex=665b357e&is=6659e3fe&hm=d75f9d9729360cd54533fc82267cbcfec61217f7aba06abe6a23c18276ea0a60&
f
Ahh, I'm afraid that's not possible right now. It works on your local environment. But since functions cannot be serialize, it doesn't work on the cloud.
Do you mind sending me a direct message so that I can understand your use case more clearly. Maybe we can figure out a workaround that doesn't require you to do this
s
So how can I check if the axios finished?
I sent you DM
2 Views