botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

statusCode: 500 Sorry, <BotName> is having a problem responding right now.*

Open chgc opened this issue 10 years ago • 9 comments

Error Message as below. { "error": { "code": "ServiceError", "message": "Sorry, BotDemo is having a problem responding right now.", "statusCode": 500 } }

it works fine when I test it in Emulator. Not OK with slack. any idea what will cause this problem?

chgc avatar Apr 01 '16 09:04 chgc

There's a closed issue where multiple of has has faced the same issue. Are you using node or C#? Are you pointing to an HTTPS domain? And have you tested that your endpoint is working? (hit it directly with Postman with a post request. Add appId and appSecret as basic authentication. And debug from there.

Aleksion avatar Apr 01 '16 09:04 Aleksion

Are you using node or C#? C#

Are you pointing to an HTTPS domain? YES

have you tested that your endpoint is working? YES

Here are the debug results for now.

  1. return message.CreateReplyMessage($"You sent {length} characters"); => working
  2. return await Conversation.SendAsync(message, MakeRootDialog); => not working (the code is copied from sample)

chgc avatar Apr 01 '16 10:04 chgc

Found it. the problem is because message.BotPerUserInConversationData has data from previous version. It has FormDialog with complete status. and that's what cause the problem. Somehow. BotConnector kept the message information from previous version of Bot. therefore, I need to clear the BotPerUserInConversationData. and then Everything is working again.

chgc avatar Apr 01 '16 10:04 chgc

Any chance you could expand a bit further on what you did to fix this? Having the same problem.

Huskitch avatar Apr 03 '16 16:04 Huskitch

@chgc

Huskitch avatar Apr 03 '16 19:04 Huskitch

Good find @chgc. For anyone wondering. All you have to do is to make message.BotPerUserInConversationData = null; before you do anything else. Publish it, and then send a message to to the bot from the channel that is giving the problem. Delete the line and publish again.

dillongoeda avatar May 07 '16 21:05 dillongoeda

dillongoeda...you are correct. That is the ONLY way to fix this issue. which sucks because anytime you get into an unknown state you are dead in the water. Has anyone found a way to handle this without having to republish 3 times?

chuckgiddens avatar Jun 25 '16 14:06 chuckgiddens

Try to send /deleteprofile command to avoid republish. Check #101 for details.

evnik avatar Jun 28 '16 17:06 evnik

Hi there,

I am trying to create an echo bot and running into same issue while connecting it from slack. I am using same configuration as @chgc. However, I do not find message.BotPerUserInConversationData anywhere in my code that was created using the template and EchoBot example in the documentation. I am NOT using the EchoBot sample in the source code of this repository. I just want to make a successful connection with slack as of now. Any guidance in where to add this flag and reset or what could be the potential cause if I do not have this flag at all?

Thanks in advance.

Update: I tried sending /deleteprofile as @evnik suggested, but after I send something else, I get the same error.

niyatia avatar Jun 28 '16 21:06 niyatia