1

I have developed a bot with the Microsoft Bot Framework (Builder v3.12.2.4, which is the latest version at this moment). I actually updated all libraries to the latest version, having AdaptiveCards as well, latest beta10.

So, I built the bot, deployed it, everything working great. But all of the sudden, all platforms give the response 'sorry, my bot code is having an issue'. So, at each input, the feedback is given (like hello, a card,...) but also this message.

I checked for double context.Wait() calls, which there are not. I enabled Informational logging and put all kinds of logging, giving below results (no error to be seen in here, as my catch statements would log a row)

2017-12-04T16:45:40  PID[4812] Information Sentiment recognition ON: True
2017-12-04T16:45:41  PID[4812] Information Forwarded message to Luis Dialog: Hallo
2017-12-04T16:45:41  PID[4812] Information Detect Chat intent in Luis Dialog

What I do see, but that was already the case before is:

2017-12-04T16:45:46  PID[4812] Warning     The Bot State API is being deprecated.  
Please refer to https://aka.ms/yr235k for details on how to replace with your own storage.

However, this seems to be something internal on the bot framework... The Bot service says 'I'm fine, no issues found'. So I am running out of ideas.

Anyone encountered this and has a clue. BTW: I have setup adaptive cards for 1 platform (telegram) and using built in herocard on another (skype, web chat) and all are giving this behavior

Additional information. I forgot to put 1 exception logging, being in the API Controller method itself. This one says: Operation returned an invalid status code 'Conflict' However, I have no idea what it means. The default REST API explanations, found via https://learn.microsoft.com/en-us/rest/api/storageservices/common-rest-api-error-codes don't seem to make sense

Nico Degraef
  • 135
  • 1
  • 9
  • That's the [HTTP Status code 409](https://httpstatuses.com/409). It may be related to the State API, or that you are using "beta10"? – stuartd Dec 04 '17 at 17:04
  • You've posted zero code. Without any idea what's going on in your code, all anyone can do is guess at why you're getting a particular error. You should spend some time reading the Help center for advice on what your question needs to contain to be on-topic and answerable. – Sam Hanley Dec 04 '17 at 18:18
  • please provide your appID and bot handle also can you please open a github issue here https://github.com/Microsoft/BotBuilder/issues/new – D4RKCIDE Dec 04 '17 at 18:47
  • Is this a possible duplicate? - https://stackoverflow.com/questions/47638240/sorry-my-bot-code-is-having-an-issue-but-it-does-not/47639736#47639736 – Joe Mayo Dec 06 '17 at 19:37
  • No Joe Mayo, you are referring to this same topic ;) – Nico Degraef Dec 08 '17 at 08:22

1 Answers1

3

The error message:

The Bot State API is being deprecated

Means that your chatbot needs to use your own storage for managing state. The URL in the message goes to the Manage custom state data with Azure Cosmos DB for .NET page, which explains why.

Last July, the Bot Framework team blogged about this: Saving State data with BotBuilder-Azure in .NET. If you read a couple of the other blog posts after that, you'll learn how to use other data stores, like SQL Server, for state management.

Really, you want to use your own state management because the amount of storage they provide is very small, improved performance, reduced latency, and greater control over state.

Setting up state should be a normal task for all of your chatbots.

Joe Mayo
  • 7,501
  • 7
  • 41
  • 60
  • 1
    I agree, a benefit with keeping your own state is also to have the control on session termination policy. – Christophe Willemsen Dec 05 '17 at 13:07
  • 1
    Thank you, I am implementing that part now, as it was a great advice. Currently that error is resolved, so it must have been something weird in the framework, but nevertheless, I read the blog posts you refer to and it gives me more possibilities as well. – Nico Degraef Dec 08 '17 at 08:24
  • i am most certainly not interested in Azure cosmos or whatever their storage is, cant we do this with say memcached or redis or something? – PirateApp Dec 22 '17 at 11:35