Closed rcarmo closed 6 years ago
Hi there!
I just (finally) got it working.
In my case, I was missing a character from the application secret, which was very hard to spot since I only figured it out when I decided to set up a new environment to do deeper debugging and it worked first time.
So thanks for taking the time to go through this issue.
(edit: removed mail junk, clarifications)
Glad I was wrong and you got it working, going to delete my comment so others aren't misled.
Thanks. Re-edited mine too. Unsure if I should file a bug regarding the way app secrets are validated in this context, but the working code is here.
@rcarmo how did you get the application secret? I am getting an error when a try to generate it locally: Error: You are attempting to perform an operation which needs access to the secret and --secret is incorrect.
@jabreuar , not sure if you solved your bug, but I had the same error locally, and deleting the padlock value (leaving it like "padlock": "") in your .bot file solved it. The new v4 bot for Node seems to automatically add a padlock value to your .bot file, but old ones did not. The app seems to run fine with a missing padlock value.
@rcarmo by the way, same error is occurred on AWS lamda. Do we have a solution?
Bot Info
Issue Description
I am trying to develop a bot in Azure Functions, but with
botbuilder
3.9.1, whenever I try to pass the Azure Functions request object to theChatConnector
listener, I get this error:This happens near line 48:
I've inspected
req.body
usingcontext.log
, and get a valid set of data:I've been looking at whatever few samples there are out there using Azure Functions, and the ones that work all seem to use
botbuilder
3.4 or 3.5, so I reverted from 3.9.1 to 3.4.2 and overcame this, which confirms that something in the intermediate releases broke Azure Functions deployments.(I had other issues, though, and I really need the features in 3.8+, so that's irrelevant).
Code Example
This is how I am trying to bind the context and response objects in Azure Functions:
Full source code is here
Expected Behavior
I expected to be able to run the
ChatConnector
listener inside Azure Functions with recent releases, because Functions provides a much richer environment to implement the back-end logic required for a complex bot.Existing third-party samples that are purported to work inside Azure Functions (that I've been able to find) all use older versions of
botbuilder
and no longer work, and there is no detailed documentation regarding how to go about doing this.References:
Microsoft/BotBuilder-Azure#10