microsoft / BotFramework-Composer

Dialog creation and management for Microsoft Bot Framework Applications
https://docs.microsoft.com/en-us/composer/
MIT License
870 stars 372 forks source link

"Replace Dialog" action doesn't find existing dialog in 2.1 #8538

Closed Clooney24 closed 3 years ago

Clooney24 commented 3 years ago

I was using a Replace Dialog action before in 1.4 that worked without problems.

In 2.1, I get this error message. (Dialog is named "Restart")

"DialogContext.BeginDialogAsync(): A dialog with an id of 'Restart' wasn't found. The dialog must be included in the current or parent DialogSet. For example, if subclassing a ComponentDialog you can call AddDialog() within your constructor."

The dialog was selected with that dropdown selector, so a misspelling can be excluded.

I tried to use "Begin Dialog" action with same dialog just to see what happens and this worked fine. So error is propably somewhere in ReplaceDialog logic.

Maybe a hint: The error texts mentioned "id" but selection is by name not by id.

Version: 2.1.0 Electron: 8.2.4 Chrome: 80.0.3987.165 NodeJS: 12.13.0 V8: 8.0.426.27-electron.0

tonyanziano commented 3 years ago

@anusharr can you please try to reproduce this? It seems like the issue is that the "Replace Dialog" is not functioning properly when selecting a target dialog from the "Dialog name" dropdown.

anusharr commented 3 years ago

@Clooney24, can you provide screenshots of your implementation along with the code (using the Show code option at the top right of the authoring canvas)? I am able to get the Replace this dialog working in v2.1.0.

Clooney24 commented 3 years ago

ok, here the UI:

image

code of the action call:

{ "value": "/reset", "actions": [ { "$kind": "Microsoft.SetProperty", "$designer": { "id": "SSmuW8" }, "property": "conversation.restartCode", "value": "=dialog.parameter+\" \"+dialog.parameter2" }, { "$kind": "Microsoft.ReplaceDialog", "$designer": { "id": "acKREH" }, "activityProcessed": false, "dialog": "Restart", "options": { "doReset": "yes" } } ] }

here UI of "Restart" dialog:

image

and partial code of the "Restart" dialog (removed the triggers part)

{ "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "hpMnvG", "name": "Restart", "description": "" }, "autoEndDialog": true, "defaultResultProperty": "dialog.result", "triggers": [ ( ** hidden for sample **) ], "generator": "Restart.lg", "recognizer": "Restart.lu.qna", "id": "Restart" }

what I'm missing in the code is that input key "doReset" that is defined in block Dialog Interface. Don't know where Composer stores this information?

cpolanish commented 3 years ago

I'm having the same issue. It seems to be specific to one particular dialog I'm trying to get into. If I switch the action to another dialog just to test it works fine.

anusharr commented 3 years ago

@Clooney24, can you attach a screenshot of your project pane. I am able to get the DialogContext.BeginDialogAsync(): A dialog with an id of ' ' wasn't found. error when I try to create a dialog of my own and link it to the Replace this dialog action, but the issue gets resolved if I add a trigger under the main dialog and connect it to the dialog I am linking in the Replace this dialog action.

@cpolanish, can you elaborate more on your implementation(screenshots, steps to reproduce, etc.)?

cpolanish commented 3 years ago

Sure, see below:

You can see I have a replace dialog action configured to go to the dialog "findCallerByName". This step is inside the "findCallerByPhone" dialog. image

Here's the code for that action { "$kind": "Microsoft.ReplaceDialog", "$designer": { "id": "WV19tb" }, "activityProcessed": true, "dialog": "findCallerByName" },

And here's the code for the findCallerByName dialog: { "$kind": "Microsoft.AdaptiveDialog", "$designer": { "id": "KUV7aW", "name": "findCallerByName", "description": "Find a caller by prompting for client name and first/last nam" }, "autoEndDialog": true, "defaultResultProperty": "dialog.result", "triggers": [ { "$kind": "Microsoft.OnBeginDialog", "$designer": { "name": "BeginDialog", "description": "", "id": "hff0EU" }, "actions": [ ... ] }, { "$kind": "Microsoft.OnDialogEvent", "$designer": { "id": "jIzycn", "name": "Store Phone" }, "event": "StorePhone", "actions": [ ... ] } ], "generator": "findCallerByName.lg", "recognizer": "findCallerByName.lu.qna", "id": "findCallerByName" }

This was working fine until recently where we just happened to notice during testing we were getting the error:

DialogContext.BeginDialogAsync(): A dialog with an id of ‘findCallerByName’ wasn’t found. The dialog must be included in the current or parent DialogSet. For example, if subclassing a ComponentDialog you can call AddDialog() within your constructor.

You don't have to do anything special, just let the bot get to that action. Like I mentioned, oddly, other replace dialog actions pointing to the same "findCallerByName" dialog that are in other dialogs work fine, and changing this particular action to point to a different dialog also works fine, it just seems to be the combination of pointing to "findCallerByName" from the "findCallerByPhone" dialog that is having an issue. I tried recreating the action and still get the same result.

anusharr commented 3 years ago

@cpolanish, apologize for the delay in response. Can you specify more on the part where your above implementation was working fine and then you started to get the error. Did you make any other changes after which the error started showing up?

cpolanish commented 3 years ago

I did not, only thing that changed was I upgraded to 2.1 (at least to the best of my knowledge). Unfortunately I ended up scrapping that bot and have rebuilt it (had a handful of random issues I was facing, figured it was better to just start fresh), but still happy to provide whatever insight I can.

Christopher Polanish Software Team Lead (631) 815-1711 @. flexiblesystems.com This e-mail and any files transmitted with it are intended only for the person or entity to which it is addressed and may contain confidential material and/or material protected by law. Any retransmission or use of this information may be a violation of that law. If you received this in error, please contact the sender and delete the material from any computer. From: anusharr @.> Sent: Monday, August 23, 2021 7:56 PM To: microsoft/BotFramework-Composer @.> Cc: Christopher Polanish @.>; Mention @.***> Subject: Re: [microsoft/BotFramework-Composer] "Replace Dialog" action doesn't find existing dialog in 2.1 (#8538)

@cpolanishhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcpolanish&data=04%7C01%7Ccpolanish%40flexiblesystems.com%7C38fde2d4229142b5249308d9669186ae%7C81202356d51047d5b65b5035a44d4965%7C0%7C0%7C637653597508095202%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wskPFNye5%2BT46gaCQzJ71yDT6BWeCIMwAkOqxor%2BGMs%3D&reserved=0, apologize for the delay in response. Can you specify more on the part where your above implementation was working fine and then you started to get the error. Did you make any other changes after which the error started showing up?

- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FBotFramework-Composer%2Fissues%2F8538%23issuecomment-904213250&data=04%7C01%7Ccpolanish%40flexiblesystems.com%7C38fde2d4229142b5249308d9669186ae%7C81202356d51047d5b65b5035a44d4965%7C0%7C0%7C637653597508105196%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=XqucEkV%2F27KJlwt4v3zJdFFkVQCZYePEGe0oCXqHu8w%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKGDAJ26QFNNP2VAFANFYO3T6LNYDANCNFSM5B4FYS5Q&data=04%7C01%7Ccpolanish%40flexiblesystems.com%7C38fde2d4229142b5249308d9669186ae%7C81202356d51047d5b65b5035a44d4965%7C0%7C0%7C637653597508105196%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jGenW4%2BiWgUXcSGLZhwzP%2B496BQusbBF9IzPmLebfx8%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Ccpolanish%40flexiblesystems.com%7C38fde2d4229142b5249308d9669186ae%7C81202356d51047d5b65b5035a44d4965%7C0%7C0%7C637653597508115192%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=cayVfUaXnZ13hFnGLNLpAE8cTp94iDQrg%2BKKO49kGTc%3D&reserved=0 or Androidhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26utm_campaign%3Dnotification-email&data=04%7C01%7Ccpolanish%40flexiblesystems.com%7C38fde2d4229142b5249308d9669186ae%7C81202356d51047d5b65b5035a44d4965%7C0%7C0%7C637653597508115192%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=eHEogfysLIbCTLyBFhbm%2ByYAxXP%2FdnSgvLq83z6lrHw%3D&reserved=0.

Clooney24 commented 3 years ago

@Clooney24, can you attach a screenshot of your project pane. I am able to get the DialogContext.BeginDialogAsync(): A dialog with an id of ' ' wasn't found. error when I try to create a dialog of my own and link it to the Replace this dialog action, but the issue gets resolved if I add a trigger under the main dialog and connect it to the dialog I am linking in the Replace this dialog action.

@cpolanish, can you elaborate more on your implementation(screenshots, steps to reproduce, etc.)?

What do you mean by "add a trigger under the main dialog and connect it to the dialog"? How did you connect the dialog to the trigger? I have a trigger in the main dialog with another Replace dialog action to same dialog, but this didn't resolve this issue.

Clooney24 commented 3 years ago

This is really urgent, we need to migrate to 2.1 quickly because of some other features, but we can't until this issue is resolved.

Clooney24 commented 3 years ago

@anusharr I'm happy to offer a screen-sharing session if that helps.

anusharr commented 3 years ago

Adding @boydc2014 for any further clarifications.

@Clooney24 @cpolanish, since the Replace Dialog action was working in v1.4, it seems be a regression on the SDK side. A quick workaround at this point would be to add "dialogs" : ["the dialog name which is configured in the Replace dialog action "] to the main dialog code to manually link the dialog to the main dialog . Let me attach screenshots of the repro I tried on my end to make it work for a better understanding:

image

image

image

image

Please give this a try and let me know if it unblocks you. I will update the thread once I have more info on the fix.

Clooney24 commented 3 years ago

Hi @anusharr,

thanks for this informations, but this workaround doesn't work and shows a very strange behaviour.

First, I get a warning "Property dialogs is not allowed":

image

When I start anyway and test the ReplaceDialog calling the "Restart" dialog, I got an error that references to id "Restart2". In my whole application there is no id "Restart2".

image

Clooney24 commented 3 years ago

here a stacktrace, looks that there are some iterations, as ReplaceDialog is called several times? (LocaleSelection, ActivityLogger and ProactiveMessaging are our custom components)

[18:21:42 ERR] ----- ERROR: 'DialogContext.BeginDialogAsync(): A dialog with an id of 'Restart' wasn't found. The dialog must be included in the current or parent DialogSet. For example, if subclassing a ComponentDialog you can call AddDialog() within your constructor.' (captured in ExceptionHandlingMiddleware) System.ArgumentException: DialogContext.BeginDialogAsync(): A dialog with an id of 'Restart' wasn't found. The dialog must be included in the current or parent DialogSet. For example, if subclassing a ComponentDialog you can call AddDialog() within your constructor. at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.ReplaceDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ReplaceDialog.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.OnNextActionAsync(DialogContext dc, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.ResumeDialogAsync(DialogContext dc, DialogReason reason, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.EndDialogAsync(Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.SetProperty.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.ReplaceDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.SwitchCondition.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.OnNextActionAsync(DialogContext dc, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.ResumeDialogAsync(DialogContext dc, DialogReason reason, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.EndDialogAsync(Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.ReplaceDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.SwitchCondition.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.OnNextActionAsync(DialogContext dc, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.ResumeDialogAsync(DialogContext dc, DialogReason reason, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.EndDialogAsync(Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.OnEndOfActionsAsync(DialogContext dc, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.OnNextActionAsync(DialogContext dc, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.ResumeDialogAsync(DialogContext dc, DialogReason reason, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.EndDialogAsync(Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.SetProperty.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.ReplaceDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.IfCondition.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.OnNextActionAsync(DialogContext dc, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.ResumeDialogAsync(DialogContext dc, DialogReason reason, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.EndDialogAsync(Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.TraceActivity.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.OnNextActionAsync(DialogContext dc, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.ResumeDialogAsync(DialogContext dc, DialogReason reason, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.EndDialogAsync(Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.SetProperty.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.OnNextActionAsync(DialogContext dc, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.ResumeDialogAsync(DialogContext dc, DialogReason reason, Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.EndDialogAsync(Object result, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.SetProperty.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.ReplaceDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.IfCondition.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginActionAsync(DialogContext dc, Int32 offset, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.BeginDialogAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.BeginDialogAsync(String dialogId, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.AdaptiveDialog.ContinueActionsAsync(DialogContext dc, Object options, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.AdaptiveDialog.ContinueDialogAsync(DialogContext dc, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogContext.ContinueDialogAsync(CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogExtensions.InnerRunAsync(ITurnContext turnContext, String dialogId, DialogContext dialogContext, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogExtensions.InternalRunAsync(ITurnContext turnContext, String dialogId, DialogContext dialogContext, DialogStateManagerConfiguration stateConfiguration, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogExtensions.InternalRunAsync(ITurnContext turnContext, String dialogId, DialogContext dialogContext, DialogStateManagerConfiguration stateConfiguration, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.DialogExtensions.RunAsync(Dialog dialog, ITurnContext turnContext, IStatePropertyAccessor1 accessor, CancellationToken cancellationToken) at Microsoft.Bot.Builder.Dialogs.Adaptive.AdaptiveDialogBot.OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken) at BotComponents.ProactiveMessaging.Middleware.ProactiveMessagingMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken) at Microsoft.Bot.Builder.RegisterClassMiddleware1.OnTurnAsync(ITurnContext turnContext, NextDelegate nextTurn, CancellationToken cancellationToken) at Microsoft.Bot.Builder.RegisterClassMiddleware1.OnTurnAsync(ITurnContext turnContext, NextDelegate nextTurn, CancellationToken cancellationToken) at Microsoft.Bot.Builder.RegisterClassMiddleware1.OnTurnAsync(ITurnContext turnContext, NextDelegate nextTurn, CancellationToken cancellationToken) at Microsoft.Bot.Builder.RegisterClassMiddleware1.OnTurnAsync(ITurnContext turnContext, NextDelegate nextTurn, CancellationToken cancellationToken) at Microsoft.Bot.Builder.RegisterClassMiddleware1.OnTurnAsync(ITurnContext turnContext, NextDelegate nextTurn, CancellationToken cancellationToken) at BotComponents.ActivityLogger.Middleware.ActivityLoggerMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken) at Microsoft.Bot.Builder.RegisterClassMiddleware`1.OnTurnAsync(ITurnContext turnContext, NextDelegate nextTurn, CancellationToken cancellationToken) at BotComponents.LocaleSelection.Middleware.LocaleSelectionMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken) at BotComponents.ExceptionMessages.Middleware.ExceptionHandlingMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken)

Clooney24 commented 3 years ago

And it’s not bound to only one specific dialog. Had same issue with other dialogs also.

anusharr commented 3 years ago

@Clooney24, thanks for the detailed response. For more clarification, are you trying this out on a newly created bot in v2.1.0 or you migrated the already existing bot from v1.4 to v2.1.0 and made the changes?

@boydc2014, I tried the workaround (add "dialogs" : ["the dialog name which is configured in the Replace dialog action "] to the main dialog code to manually link the dialog to the main dialog) and it worked as expected and I do not get the warning "Property dialogs is not allowed". The user has pasted their stack trace above.

boydc2014 commented 3 years ago

This is a known issue in SDK side that the ReplaceDialog is invoked from the parent context (which may don't have the target context) https://github.com/microsoft/botbuilder-dotnet/pull/5656

Clooney24 commented 3 years ago

Looks like it's fixed since June 18th but nothing happend since then (10 weeks)? After all, this is a bug in a core functionality, that breaks any bot migrating from 1.4 that is using ReplaceDialog.

Is there any estimate when this PR will be merged and released?

a-b-r-o-w-n commented 3 years ago

@Clooney24 I have reached out to the SDK engineers about that PR. There is no update as of now.

mrivera-ms commented 3 years ago

The PR 5656 (dotnet) has been merged and will be available in the next release.