Botbuilder-js: Service Error - Direct Line Time Out Error - @azure\ms-rest-js

Created on 12 Jun 2019  路  4Comments  路  Source: microsoft/botbuilder-js

Versions

botBuilder Node.JS V4 .
8.9.4
Edge
Windows 10

Describe the bug

I am developing a bot using the v4 botbuilder SDK for Node.js. In one of the dialogs I am getting a strange Error.

The bot is using a Web Service that will return data. After getting data we are sending them to the user in carousel of hero cards.

the data is well recived and formatted, I checked that. Then, when calling the
return await step.context.sendActivity(carousel);

Locally, the carousel is well shown using the Bot Framework Emulator.

But in production envirement (Deployed on Azure and comunicates with the bot via Direct Line channel),
the bot crushes and throws this error after about a time out of 1 minute ...

Error: {
 "error": {
   "code": "ServiceError"
 }
}


  at new RestError (D:\home\site\wwwroot\node_modules\@azure\ms-rest-js\dist\msRest.node.js:1397:28)

  at D:\home\site\wwwroot\node_modules\@azure\ms-rest-js\dist\msRest.node.js:1849:37

  at <anonymous>

  at process._tickDomainCallback (internal/process/next_tick.js:228:7)

In other dialogs, we have the same case of getting data from a service and sending back them to the user in a carousel of hero cards. And this works without a problem.

After more debugging in our client App, I found out that the Direct Line do not return the activity but return a timeout error.

Also I've got many Time out Errors on the Direct line Channel in the Web App Bot

I cannot understand if the problem is with Direct Line API or with @azurems-rest-js module?
Any help with this issue?
I also changed the Web App Node version to supported by Azure V10 ...

Expected behavior

The bot should respond instantly with a carousel of Hero Cards.

Screenshots

image

Additional context

This problem accrues after the migration from V3 to V4 Version of the SDK.

Support

Most helpful comment

Hi @montacerdk - I would like to help but I need some more information.

  1. Can you give an example of the payload your bot is sending to Direct Line when this issue occurs? The JSON data of the attachments would be nice, or you could just provide the code that's generating the hero cards and the carousel.
  2. Are you using Web Chat or your own Direct Line client?

All 4 comments

Hi @montacerdk - I would like to help but I need some more information.

  1. Can you give an example of the payload your bot is sending to Direct Line when this issue occurs? The JSON data of the attachments would be nice, or you could just provide the code that's generating the hero cards and the carousel.
  2. Are you using Web Chat or your own Direct Line client?

@montacerdk - Are you still working on this?

Hi @v-kydela, I am sorry for the late reply, this issue was resolved.

I am using my own Direct Line client.
The problem was with the data structure, one of the hero cards contains a wrong passed values. So that the context.sendActivity(carousel); was working in the Bot Framework Emulator and throws an time out error in case of the Direct Line chanel.

Thank you for your support and time.

I'm glad you could get this resolved.

Was this page helpful?
0 / 5 - 0 ratings