4.5.1
With the Bot Framework Emulator version 4.5.1, RetryPrompts in Dialogs are no longer working as expected. Specifically, with a text prompt, the validation method is called... but if it returns false the RetryPrompt Activity is only displayed that first time. If you enter invalid input again and again after that first time, the validation method is called each time (as it should be), but when it returns false... nothing is output.
The exact same dialog (same code, no changes) running in Direct line / Web Chat functions properly. Problem appears to be specific to the Bot Framework Emulator.
@torynfarr we can't reproduce this. were you able to resolve your issue?
closing to do lack or activity. @torynfarr if you are still experiencing this issue, please open a new issue and we'll help
While testing the multi-turn-prompt C# sample on the emulator v4.5.2, I found that the retry prompt isn't showing up when I enter an invalid value for the age the second time. Instead, it waits for me to enter the value within the accepted bounds and then proceeds with the next steps. The retry prompt is displayed only once. However, when I test it on the lower version(v4.3.3), it works just fine and the retry prompt shows up every time an invalid value is entered.
Attaching the screenshots for both the versions below:


Edit: Yes, when I check the logs in both the versions, the Activity having the invalid message is getting sent, just that it does not show up. Attaching the Stack Overflow issue reported by a user regarding the same :https://stackoverflow.com/questions/58082537/why-does-the-retry-prompt-only-show-once
Hi @anusharavindrar. Thank you for re-opening this. If you look at the log panel in your screenshots, the Activity holding the invalid value message is getting sent in to the Emulator in both versions correctly, and you can inspect it normally. What isn't showing up is the message in the chat control. This is a bug and something we will fix.
Cheers
My suspicion is this:
MessageFactory.Text.id property already populated.@v-kydela Are you saying the following highlighted activities have same activity ID? For example, can you repro it in Emulator and click on the highlighted rows and check?

If yes, Web Chat will merge them into a single entry. And we would need to fix it in Emulator.
@compulim - Yes. This customer has already done that detective work.
I just tried this on both master and in the latest nightly build, and I'm not able to reproduce this issue. The retry prompt activities all have unique IDs as well.
master

Latest nightly (4.5.2-82320)

@torynfarr or @anusharavindrar can you try this scenario out on the latest nightly version and see if the issue has been resolved?
@tonyanziano are you able to reproduce in the following issue? https://github.com/microsoft/BotFramework-Emulator/issues/1888
Hey @tonyanziano, we were working on this issue and we are still able to repro it with the latest nightly version but only when using a dotnet sample. Are you using a JS one?

@tonyanziano I tried out the multi-prompt C# sample on the latest nightly version and I am still able to repro the issue. Attaching the screenshots below.


However, it works just fine with the JS multi-prompt sample.

Hi @Aliandi ,
Yeah, I'm using a JS sample, and it seems to work fine.
So I'm starting to believe that this is a C# issue.
@cwhitten isn't microsoft/BotFramework-Emulator#1888 a dupe? Either way I tried to reproduce the same scenario by entering "no" instead of a number, and the retry prompt activity still appeared every time using the JS sample.
@tonyanziano, looking here it seems like there is an issue between C# and the Emulator, as the sample seems to work just fine on other channels.
We are going to:
We'll update you how that goes.
Thanks for helping out @Aliandi . Sounds good.
@Aliandi - I had already determined the cause of this issue as shown in this comment. I've now raised this as a bug in the .NET repo.
I think that this issue depends on if & how IDs are generated by both the JS and C# runtimes, and the activity ID logic on the Emulator side.
In the Emulator, if we receive an activity that already has an ID, we default to that ID and do not generate one, if it doesn't have an ID, we generate one ourselves.
With that in mind, here are the two scenarios I'm thinking of:
The C# runtime generates incorrect (duplicate) activity IDs for retry prompt activities, which then get passed to the Emulator and are used.
The C# runtime does not generate any IDs for the activities, and the generation is done (incorrectly) on the Emulator side for retry prompts
In either of these scenarios, the JS runtime could either be generating the correct IDs, or in fact, no IDs are generated and the Emulator is correctly generating them.
===
EDIT
Sorry @v-kydela , just looked at your comment and the issue you opened up. So it looks like it is scenario 1 above, and it's caused by how the C# sdk generates the activity IDs associates sent activity IDs (channel-generated) with activities on the bot's side.
@tonyanziano
No SDK generates an activity ID for outgoing activities. Like a conversation ID or a user ID, an activity ID is generated by the channel and the format will vary between channels. The generation is done by the Emulator, though not incorrectly. It's the Emulator's responsibility to generate an ID because it has to.
As I explained in the bug that was just linked, the difference between the .NET SDK and the Node SDK is that the .NET SDK uses the channel-generated activity ID after sending the activity to update its own activity on the bot side, so the bot now has an activity with an ID that matches the one in the channel. In the case of a retry prompt, that ID will be saved into the dialog state and used on subsequent turns, and in the case of the Emulator, the activity will reach the Emulator already having an ID that matches an activity that's already in the Emulator.
@v-kydela ahhhh, I see. Thanks for clearing that up.
this is linked with
https://github.com/microsoft/botbuilder-dotnet/issues/2689
additional issue reports:
https://github.com/microsoft/BotFramework-Emulator/issues/1888
This is a quirk of the Emulator. Other channels do not respect the ids of incoming activities, but use a generated one. PR for emulator: https://github.com/microsoft/BotFramework-Emulator/pull/2003
Nonetheless, the spec does state
Clients and bots SHOULD NOT include an id field in activities they generate.
SDKs updates to not send ids: