GithubHelp home page GithubHelp logo

IDialog method execution finished with multiple resume handlers specified through IDialogStack. invalid need: expected Call, have Wait (Microsoft.Bot.Builder.Internals.Fibers.InvalidNeedExceptio) about botbuilder-v3 HOT 18 CLOSED

tsvovan avatar tsvovan commented on June 10, 2024
IDialog method execution finished with multiple resume handlers specified through IDialogStack. invalid need: expected Call, have Wait (Microsoft.Bot.Builder.Internals.Fibers.InvalidNeedExceptio)

from botbuilder-v3.

Comments (18)

v-kydela avatar v-kydela commented on June 10, 2024

@tsvovan - Issues about bots throwing exceptions should not be posted in the botframework-sdk repo. When you opened this issue, you should have seen this page: https://github.com/microsoft/botframework-sdk/issues/new/choose

Create new Bot Builder DCR

Create a new Bot Builder design change request to track changes to the Bot Builder architecture.

A DCR is a design change request. That means these issues should only be about the overall design of the SDK and not specific bugs or how-to questions.

It looks like you're building a v3 bot. The repo you should be using for v3 questions is here: https://github.com/microsoft/BotBuilder-V3

You will notice in the README that v3 is deprecated. I may be able to help you but I have a few questions first.

  1. Can you explain why you're building a v3 bot rather than a v4 bot?
  2. Have you considered migrating to v4?

from botbuilder-v3.

tsvovan avatar tsvovan commented on June 10, 2024

Sorry, that I created issue incorrectly.

  1. It was created in a v3 before I started working with it.
  2. Will it resolve my issue? As I know there are several differences between bot's entities and it will not be easy to do it quickly. So I guess it will be much better to resolve my bug first.
    Thank you.

from botbuilder-v3.

v-kydela avatar v-kydela commented on June 10, 2024

@tsvovan - Yes, migrating to v4 will certainly resolve your issue because dialogs are handled totally differently in v4 and the exception you're encountering no longer exists. If you really want to try to fix this problem in your v3 bot then you're doing work that will have to be undone later when you migrate to v4, thus increasing your technical debt. If you want to get help with that then you'll need to give us more information about the exception, like the line that's throwing it.

from botbuilder-v3.

tsvovan avatar tsvovan commented on June 10, 2024
await ChatMessageReceivedAsync(context, (IAwaitable<IMessageActivity>)result);
->
context.Wait(MessageReceivedAsync);

this line exactly.

from botbuilder-v3.

v-kydela avatar v-kydela commented on June 10, 2024

@tsvovan - Thank for you the code snippet. I received an email that made it look like you made another comment about wanting articles to help you migrate so I'm unsure why that's not showing up here. You should be able to find good information in the readme of the repo I linked to earlier: https://github.com/microsoft/BotBuilder-V3

Here is the official migration documentation that you should find helpful: https://aka.ms/bf-migration-overview

Are you wanting to migrate or do you just want help making v3 work?

from botbuilder-v3.

tsvovan avatar tsvovan commented on June 10, 2024

I don't have time to migrate it to v4 now. So I want just making it work now. Thank you.

from botbuilder-v3.

EricDahlvang avatar EricDahlvang commented on June 10, 2024

Hi @tsvovan

The exception:

IDialog method execution finished with no resume handler specified through IDialogStack. (Microsoft.Bot.Builder.Internals.Fibers.InvalidNeedExceptio)

means there is probably a missing context.Wait(MessageReceivedAsync); on one of the code paths. If .Forward, .Call or a .Prompt are not executed, then message processing needs to end with context.Wait(methodnamehere); so the next message knows where to begin execution.

I've tried to look at the .txt file you've shared, but honestly it is just too difficult to follow the code flow since there is a lot happening in there and we do not have the dependencies. Please try debugging this locally, and step through the code making sure context.Wait is called if there is no .Forward or .Call in the flow.

from botbuilder-v3.

v-kydela avatar v-kydela commented on June 10, 2024

@tsvovan - Have you seen these issues? They might help you

I've had a good look through the source code and I don't see any way for context.Wait to throw a NoResumeHandlerException. It would make much more sense for it to throw a MultipleResumeHandlerException because it adds a resume handler, so why would it complain that there's no resume handler?

Like Eric said, please try debugging locally and stepping through the code. It might help if you provided the details of the inner InvalidNeedException exception. Have could either be None or Done.

from botbuilder-v3.

tsvovan avatar tsvovan commented on June 10, 2024

@EricDahlvang This bot has thousands of messages each day and only around 10 of them have such a problem. So I don't know the way how to recreate it. So I can't debug it.

@v-kydela You are right it throws a MultipleResumeHandlerException. Inner exception is InvalidNeedException.
Microsoft.Bot.Builder.Dialogs.MultipleResumeHandlerException: at Microsoft.Bot.Builder.Dialogs.Internals.ExceptionTranslationDialogTask+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__2.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Internals.SerializeByConversation+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__4.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Internals.PostUnhandledExceptionToUser+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__5.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Internals.PostUnhandledExceptionToUser+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__5.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Internals.LogPostToBot+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__3.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Conversation+<SendAsync>d__11.MoveNext (Microsoft.Bot.Builder.Autofac, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Conversation+<SendAsync>d__6.MoveNext (Microsoft.Bot.Builder.Autofac, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at BotApplication.MessagesController+<Post>d__0.MoveNext (Bot Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullBot Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: E:\Repository\AlfaBank\Alfa-Bot\Bot Application\Controllers\MessagesController.csBot Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 27) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Threading.Tasks.TaskHelpersExtensions+<CastToObject>d__11.MoveNext (System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Web.Http.Controllers.ApiControllerActionInvoker+d__1.MoveNext (System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Web.Http.Filters.ActionFilterAttribute+d__6.MoveNext (System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Web.Http.Filters.ActionFilterAttribute+d__6.MoveNext (System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Web.Http.Filters.ActionFilterAttribute+d__5.MoveNext (System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Web.Http.Controllers.ActionFilterResult+d__5.MoveNext (System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Web.Http.Controllers.ExceptionFilterResult+d__6.MoveNext (System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
Inner exception Microsoft.Bot.Builder.Internals.Fibers.InvalidNeedException handled at Microsoft.Bot.Builder.Dialogs.Internals.ExceptionTranslationDialogTask+d__2.MoveNext:
at Microsoft.Bot.Builder.Internals.Fibers.Extensions.ValidateNeed (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at Microsoft.Bot.Builder.Internals.Fibers.Frame1.Microsoft.Bot.Builder.Internals.Fibers.IWaiter<C>.set_Wait (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at Microsoft.Bot.Builder.Internals.Fibers.Extensions.Wait (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at Microsoft.Bot.Builder.Dialogs.Internals.DialogTask.Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack.Wait (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at BotApplication.Dialogs.RootDialog+<ChatMessageReceivedAsync>d__19.MoveNext (Bot Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullBot Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: E:\Repository\AlfaBank\Alfa-Bot\Bot Application\Dialogs\RootDialog.csBot Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 687) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at BotApplication.Dialogs.RootDialog+<MessageReceivedAsync>d__12.MoveNext (Bot Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullBot Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: E:\Repository\AlfaBank\Alfa-Bot\Bot Application\Dialogs\RootDialog.csBot Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 325) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Internals.DialogTask+ThunkResume1+d__5.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Internals.Fibers.Wait2+<Microsoft-Bot-Builder-Internals-Fibers-IWait<C>-PollAsync>d__19.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Internals.Fibers.Frame1+<Microsoft-Bot-Builder-Internals-Fibers-IFrameLoop-PollAsync>d__9.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Internals.Fibers.Fiber1+<Microsoft-Bot-Builder-Internals-Fibers-IFiberLoop<C>-PollAsync>d__16.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Internals.Fibers.Wait2.Microsoft.Bot.Builder.Internals.Fibers.IAwaiter.GetResult (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at Microsoft.Bot.Builder.Dialogs.Chain+LoopDialog1+<ResumeAsync>d__3.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Internals.DialogTask+ThunkResume1+d__5.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Internals.Fibers.Wait2+<Microsoft-Bot-Builder-Internals-Fibers-IWait<C>-PollAsync>d__19.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Internals.Fibers.Frame1+<Microsoft-Bot-Builder-Internals-Fibers-IFrameLoop-PollAsync>d__9.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Internals.Fibers.Fiber1+<Microsoft-Bot-Builder-Internals-Fibers-IFiberLoop<C>-PollAsync>d__16.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Internals.DialogTask+<Microsoft-Bot-Builder-Base-IEventLoop-PollAsync>d__23.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Internals.ReactiveDialogTask+<Microsoft-Bot-Builder-Base-IEventLoop-PollAsync>d__3.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Dialogs.Internals.ScoringEventLoop1+d__5.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Dialogs.Internals.EventLoopDialogTask+d__3.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Dialogs.Internals.SetAmbientThreadCulture+d__3.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Dialogs.Internals.QueueDrainingDialogTask+d__4.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Dialogs.Internals.PersistentDialogTask+d__3.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Dialogs.Internals.PersistentDialogTask+d__3.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Dialogs.Internals.ExceptionTranslationDialogTask+d__2.MoveNext (Microsoft.Bot.Builder, Version=3.20.1.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
`

Inner - Microsoft.Bot.Builder.Internals.Fibers.InvalidNeedException handled at Microsoft.Bot.Builder.Dialogs.Internals.ExceptionTranslationDialogTask+<Microsoft-Bot-Builder-Dialogs-Internals-IPostToBot-PostAsync>d__2.MoveNext

from botbuilder-v3.

EricDahlvang avatar EricDahlvang commented on June 10, 2024

The inverse of the rule I mentioned above sounds like the problem. If a .Prompt, .Forward or .Call occurs, then a context.Wait should NOT occur afterwards. (These methods setup an internal .Wait method)

from botbuilder-v3.

v-kydela avatar v-kydela commented on June 10, 2024

@tsvovan - Why did you say the message was "IDialog method execution finished with no resume handler specified through IDialogStack."?

from botbuilder-v3.

tsvovan avatar tsvovan commented on June 10, 2024

@v-kydela It is exactly what is in an app insights logs.
image

from botbuilder-v3.

v-kydela avatar v-kydela commented on June 10, 2024

@tsvovan - That screenshot says "multiple resume handlers" and not "no resume handler."

from botbuilder-v3.

tsvovan avatar tsvovan commented on June 10, 2024

@v-kydela and how can I fix it?

from botbuilder-v3.

v-kydela avatar v-kydela commented on June 10, 2024

@tsvovan - Why did you say the message was "IDialog method execution finished with no resume handler specified through IDialogStack."? Where did you get that message? Did you copy and paste from another post that you thought was about your issue? It will be very difficult to help you troubleshoot your issue if we're dealing with inaccurate information

from botbuilder-v3.

tsvovan avatar tsvovan commented on June 10, 2024

@v-kydela Sorry, my fault. I don't have such messages. Corrected. Sorry again.

from botbuilder-v3.

tsvovan avatar tsvovan commented on June 10, 2024

Also, I have one more problem Autofac not always resolves IRedisCacheManager. Do you know why it happens?

from botbuilder-v3.

EricDahlvang avatar EricDahlvang commented on June 10, 2024

Hi @tsvovan

I'm sorry you've run into these issues. It seems the project you are working on is somewhat complex, and these issues require debugging to track down. We cannot debug the project here, but only provide guidance and direction. The initial error you've reported with this issue is in the bot, not the sdk. The bot is either making a call to context.Wait after calling .Forward, .Call or Prompt... OR the bot is missing a call to context.Wait.

We recommendation to debug the code and determine where this occurring.

The v3 dotnet sdk binarily serializes fields on dialogs into state. Fields are then de-serialized in order to process the next message when it is received. If IRedisCacheManager is a field on a dialog, it is probably being serialized into storage, and then incorrectly de-serialized upon processing the next message. The sdk provides FiberModule.Key_DoNotSerialize, which can be used to exclude certain fields from this process.

from botbuilder-v3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.