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

[State Service] All Channels, All Messages: "Sorry, my bot code is having an issue."

Open dkershner6 opened this issue 8 years ago • 35 comments

Bot Info

  • App ID: 05483456-e1be-45a5-95a1-d87fc89dbeba
  • SDK Platform: .Net
  • SDK Version: 3.12
  • Active Channels: Web Chat, Skype, Slack
  • Deployment Environment: Azure Bot Service, Azure App Service
  • Region: West US

Issue Description

Every message sent results in the correct message being sent back, but then a bot issue (error). I have checked the solitaire bot : https://bots.botframework.com/bot?id=Solitaire, and it is experiencing the same issue. I started on 3.9 and upgraded to 3.12 with no improvement. image

Code Example

Any

Reproduction Steps

  1. Send any message.

Expected Behavior

The response, without an error, and the ability to accept a new response.

Actual Results

Response, then an error, and resets.

dkershner6 avatar Dec 04 '17 18:12 dkershner6

I am also experiencing this exact same issue. Bot worked perfectly fine before the weekend. botissue

ThisIsColinB avatar Dec 04 '17 18:12 ThisIsColinB

I am getting the same issue as well.

sharontf avatar Dec 04 '17 19:12 sharontf

me too since yesterday

KIBASSA avatar Dec 04 '17 19:12 KIBASSA

This error appears to now have moved on to the messages not being sent at all. The webchat also will either not load or not send. Skypebot also appears to be offline for the moment, possibly related or not.

dkershner6 avatar Dec 04 '17 19:12 dkershner6

@dkershner6 if you type /deleteprofile to your bot what happens when you try to have a conversation afterwards?

@sharontf @KIBASSA please provide your app IDs

JasonSowers avatar Dec 04 '17 19:12 JasonSowers

we had a similar issue - moving the bot (session) state to a persistent db seemed to have solved the issue

Kannaj avatar Dec 04 '17 19:12 Kannaj

I'm having similar strange issues in which the bot doesn't seem to update its state anymore. I'm still using the state service. Did something change in the past day?

dan-cohn avatar Dec 04 '17 19:12 dan-cohn

@Kannaj Correct, the issue was resolved after moving to state to db.

@JasonSowers: In future, can this be handled better like informing via emails?

sagarpomal avatar Dec 04 '17 19:12 sagarpomal

@sagarpomal @Kannaj I may be misunderstanding, but what do you mean by "moving the bot (session) state to a persistent db"?

ThisIsColinB avatar Dec 04 '17 19:12 ThisIsColinB

This is my bot ID link https://dev.botframework.com/bots?id=emiko (only on messenger) What does that mean 'moving to state to db'?

KIBASSA avatar Dec 04 '17 19:12 KIBASSA

@JasonSowers it now works, even though I didnt change anything at all...

I did test the deleteprofile on the solitairebot though, it doesnt seemed to have worked, and that bot is still having issues.

I am also a bit in the dark between the difference of the state service and using a persistent DB...

dkershner6 avatar Dec 04 '17 19:12 dkershner6

I am still experiencing the issue of "Sorry, my bot code is having an issue". Location: South Central US

ThisIsColinB avatar Dec 04 '17 20:12 ThisIsColinB

If you are having this issue please provide your app ID so we can investigate and track

JasonSowers avatar Dec 04 '17 20:12 JasonSowers

@JasonSowers App ID: 62a3f1ae-f10a-43f4-ac70-d2c22b3f69a5

ThisIsColinB avatar Dec 04 '17 20:12 ThisIsColinB

App ID:d10755e5-fd3d-4824-8492-3b18a8455af6

KIBASSA avatar Dec 04 '17 20:12 KIBASSA

A known solution is to implement a custom state store rather than use the default state store details can be found here for c#, and here for node. The default state store is intended for prototyping only and is not intended for production bot. We highly recommend all bots Implement a state store that is not the default.

We are still actively investigating.

JasonSowers avatar Dec 04 '17 20:12 JasonSowers

Same here, been happening for 24 hours and still on-going for Web Chat, Facebook Messenger, Skype and Direct Line channels. Any other examples of a state storage using SQL Server? I already have a database I can use. AppID: 386a3c4e-a7df-4ff9-85ff-a0271820d254

stuprice avatar Dec 04 '17 20:12 stuprice

There are also samples in this repo https://github.com/Microsoft/BotBuilder-Azure one of them is for AzureSQL. If you were planning to use an on-premise SQL server it would have to be publically exposed.

JasonSowers avatar Dec 04 '17 20:12 JasonSowers

@ThisIsColinB : Please refer the comment above by JasonSowers.

sagarpomal avatar Dec 04 '17 20:12 sagarpomal

I've found this: https://blog.botframework.com/2017/07/26/saving-state-sql-dotnet/ and the sample code here: https://github.com/Microsoft/BotFramework-Samples/tree/master/blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql

Obviously not going to put a SQL Server public on the web but would seem easy enough to put a simple Web API in front of it. Where exactly is the state service called from? Is it ever called from somewhere other than my own bot code?

stuprice avatar Dec 04 '17 20:12 stuprice