Closed rwmb closed 6 years ago
The Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework Github repo is the preferred platform for submitting bug fixes and feature requests.
You have already asked the question in issue #5004 in the BotBuilder repo. My recommendation would be to continue to push Firebase to assist you.
@rwmb Have you tried to 'bubble up' the Promise, as Frank van Puffelen suggested?
That doesn't work, the request sends a 202. Using cloud functions there's no way to respond to this request correctly. I had to create a pubsub topic and send the request to that in order to prevent the function from halting.
Botbuilder version: 3.15.0 I'm using Dialogflow as the handler for my botbuilder endpoint, which is a Azure Bot Service bot, and the handler is deployed on a Firebase Cloud Function, but for every botframework request I make, the function returns a 202 (that's the default behaviour of botbuilder I believe), and the function stops working in the middle of the code. I saw in this response from Frank van Puffelen that the functions may halt if there's a response from the function.
https://stackoverflow.com/questions/42875400/cloud-functions-for-firebase-serializing-promises
Is there a way to stop this "accepted" code from returning? I know the rest of the code is working fine because I'm using the same principles in my web version of the chatbot, so I'm certain that it's relalted to botbuilder's integration with firebase cloud functions. I'm using the Universal Bot to setup the callback for the messages.
const bot = new builder.UniversalBot(this.connector, botFrameworkCallback) .set('storage', new builder.MemoryBotStorage());
And here's the
botFrameworkCallback
:The whole integration part is there to give user specific responses, so this code does a lot of API requests, like Firestore ones, the Dialogflow one, and because of that we've set it up this way.