microsoft / BotFramework-Composer

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

ReplaceDialog on child dialog error: Value cannot be null. (Parameter ‘dialogId’) #4816

Closed scheyal closed 2 years ago

scheyal commented 3 years ago

Scenario:

Top dialog calls child dialog Child dialog replaces itself with top dialog

repro images

image

image

image

cwhitten commented 3 years ago

@scheyal how different is is your setup compared to the "Dialog Actions" sample, which exercises Replace Dialog a bit, and is working fine for me on the 4.11.0 runtime packages. And here is the tracking issue for the export bug: https://github.com/microsoft/BotFramework-Composer/issues/4819

scheyal commented 3 years ago

It repros once you go through ~2 cycles. Also, repos with all variations of using begin dialog in place of replace dialog. Repro shared with provided private bits (with fixed zip packaging).

tonyanziano commented 3 years ago

@scheyal can you add the zipped assets to this issue or upload it somewhere where we can access it to repro & debug?

scheyal commented 3 years ago

Another scenario that illustrates this:

scheyal commented 3 years ago

zip export is (was) broken - here's a manual zip. bugtest.zip

garypretty commented 3 years ago

Adding comments here that I shared with @scheyal offline that might help. You probably want to update the scenario and retest using the following points.

From my initial glance over the pattern, I would need to validate but I think what you need is.

• You top dialog should have a call to RestartDialog once you call whichever child dialog the user chooses, so that when the child dialog returns, it shows the menu again. • If you are in a child dialog (LUIS or Orchestrator in your case) and you want to show the menu again, you just call EndDialog. This will pop the dialog off the stack and return back to root, which will loop to show the menu. • Only call ReplaceDialog if you want to replace with a sibling – if you call ReplaceDialog for the TopDialog, you essentially end up with TopDialog being a child of itself.

scheyal commented 3 years ago

(FYI no variation per above worked)

venegasmi commented 3 years ago

Hello, I'm having this exact issue when restarting the dialog as well.

I have tried the actions suggested in this thread but none have solved the problem yet. Once it goes through 2 cycles, I get an error: Value cannot be null (Parameter 'dialogId')

Is there any fix for this yet?

Samirun commented 3 years ago

Hello, I got this one too. any solution? showing again the root dialog with all the options may not be user friendly as user may need to repeat few steps again

ashokdevlabs commented 3 years ago

Hello, I got this issue too, while calling dialog 2nd time. Has anyone got any solution yet?

michaelstiben commented 3 years ago

Hi. I got this issue too. I tried using "replace dialog", "begin new dialog" and "cancel dialog" but any of this function for me. Is there any workaround about this?

slymuffhugger commented 3 years ago

I am having the same issue.. was thinking "replace this dialog" should end the current dialog and start a new one which is specified. Is that not correct?

I have a parent dialog "RescheduleDialog" and a child dialog "PickRescheduleSlotDialog".. If the user does not want the slot, we ask them "would you like to try again with a different load number", and send them back to the beginning of the parent dialog "RescheduleDialog"... but if they cancel and try again more than once, this error comes..

slymuffhugger commented 3 years ago

I was able to work around in my scenario by setting a variable user.tryAgain in the child dialog, then ending the child dialog and using the variable in the parent dialog to either start over or move on.

garypretty commented 3 years ago

@EricDahlvang @mrivera-ms can we take a look at this issue, once we have our priority R12 items out of the door, please?

praneeth1987 commented 3 years ago

@kalebk could you please elaborate your workaround? I am facing same issue but could not get thru your WA.

anmolgandhi007 commented 3 years ago

Is there any update when can we expect the fix to come up? I am facing similar issue with replace dialog. Its impacting the process/timeline of development and the bot to move to production. Please provide an update. Thanks!

tamasschilp commented 2 years ago

Is there any update?

Danieladu commented 2 years ago

hi @scheyal , sorry for the delay reply. This issue has been fixed by this PR: https://github.com/microsoft/botbuilder-dotnet/pull/5072 Please update your SDK to >= 4.12 version to achieve the fix. Thanks!

boydc2014 commented 2 years ago

hi @scheyal , sorry for the delay reply. This issue has been fixed by this PR: microsoft/botbuilder-dotnet#5072 Please update your SDK to >= 4.12 version to achieve the fix. Thanks!

Thanks @Danieladu helping investigating this. @tamasschmolcz Please try the latest composer version. Closing this for now, free feel to reopen if this hasn't solve this issue.

ambuj74 commented 2 years ago

Hi @boydc2014 , I am using botframework composer version 2.1 stilll i am facing the same issue if trying to call the same dialog after the second time, could you pplease help me on this.