A bot created and published by the Bot Framework Composer will work fine with the default Web Chat channel.
When adding the Direct Line channel and then performing requests against the API REST endpoint, the Bot will give the initial greeting and then onward responds only with "Value cannot be null. (Parameter 'key')".
1.01
Steps to reproduce the behavior:
The bot should give proper response and not the error message.
This is how the Resources on azure look like after deployment:

Could it be that an App setting is missing on the App Service?
This is a continuation from this bug report: https://github.com/microsoft/BotFramework-Composer/issues/2240
@rubit0 , I have dowloaded your bot and tested it. It works fine in my side, the only change I did is to remove the httpsteps to the azure functions, because I don't have a azure function example. Could the issue be caused by the http request to azure functions? could you share more details on that? do you use any key to access the azure function urls?


Hey @rubit0 I was facing the exactly same issue for a couple of days and luckly I could find out why this morning.
In my case what fixed was adding the "locale" field in the json request body when creating an activity. Here is how my POST request looks like:
POST https://directline.botframework.com/v3/directline/conversations/{conversationId}/activities
{
"from": {
"id": "customId",
"name": "customName",
"role": "user"
},
"locale": "pt-BR",
"recipient": {
"id": "bot",
"name": "Bot",
"role": "bot"
},
"text": "some text",
"textFormat": "plain",
"type": "message"
}
Hope this helps you somehow
@viivalerio Oh wow now it works! Thank you!
This is how the request body must look like when posting a new acticity:
{
"locale": "en-EN",
"type": "message",
"from": {
"id": "user1"
},
"text": "Hello bot."
}
@luhan2017 @@DDEfromOR I did submit the problem and solution to the documentation page: https://github.com/MicrosoftDocs/bot-docs/issues/1806
Big thanks again to @viivalerio in providing the fix!
@Danieladu @boydc2014 Do you have more comments for this issue ? sounds like LG language policy issue.
https://github.com/microsoft/botbuilder-dotnet/issues/4219 sdk fixed the issues . composer will adopt latest sdk fix.
composer has updated the sdk version to 4.10.0, so close this.
Most helpful comment
Hey @rubit0 I was facing the exactly same issue for a couple of days and luckly I could find out why this morning.
In my case what fixed was adding the "locale" field in the json request body when creating an activity. Here is how my POST request looks like:
POST https://directline.botframework.com/v3/directline/conversations/{conversationId}/activities
{
"from": {
"id": "customId",
"name": "customName",
"role": "user"
},
"locale": "pt-BR",
"recipient": {
"id": "bot",
"name": "Bot",
"role": "bot"
},
"text": "some text",
"textFormat": "plain",
"type": "message"
}
Hope this helps you somehow