botframework-sdk: Direct Line API + Action Fulfillment in LUIS not working
I was normally using this setup (Direct Line API + Action Fulfillment in LUIS) until yesterday when it started to fail. I have a LUIS model configured with action fulfillment using the Definition Channel. Then I published this model using the option “Enable Action Binding using Microsoft Bot Framework”, and registered a new bot in the bot framework portal to point to that model. Then yesterday, I started to receive errors when I post a message to the bot using the directline API. Next are the responses I get using different ways:
- Using the REST interface provided in the documentation here, I’m able to create conversatons and retrieve messages but when I post a new message I get a Response Body
{
"message": "Failed to send message: bot returned an error"
}
with a Response Code 500
- When using the Direct Line Nuget package from CSharp code, I get
Microsoft.Rest.HttpOperationException occurred
HResult=-2146233088
Message=Operation returned an invalid status code 'InternalServerError'
Source=Microsoft.Bot.Connector.DirectLine
StackTrace:
at Microsoft.Bot.Connector.DirectLine.Conversations.<PostMessageWithHttpMessagesAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Bot.Connector.DirectLine.ConversationsExtensions.<PostMessageAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Test.Directline.<GetDefinition>d__6.MoveNext() in C:\Test\Directline.cs:line 136
InnerException:
Looking into Fiddler, I get the same error as in the REST interface.
- If I configure the bot to get telemetry using an Application Insights key, I get
Exception type: System.Exception
ExceptionDetail:
{ "Data": {},
"Source": "Microsoft.Bot.ChannelConnector",
"HResult": -2146233088
}
StatusCode: BadRequest
Any idea of what might be happening? Thanks!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (10 by maintainers)
For anyone who runs into the same issue: I was using DirectLine.dll 1.0.2 (as Rina1Patel) to connect to the Luis-Bot. InternalServerException. Then I updated the DirectLine Nuget Package to DirectLine 3.0.2 and that solved the issue. Note that the methods in DirectLine 3.0.2 have diffrent names, everything that was named “Message” before is now “Activity”. There is an example project in the Microsoft BotBuilder-Samples called Core-DirectLine that you can use to copy from.
Just checking in, we are still working with the LUIS team on this.