question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating custom dialog inherits from InputDialog crashed in Bot Framework composer

See original GitHub issue

Version

Bot Framework composer 1.3.0

Describe the bug

Application get crashed.

To Reproduce

created custom action class using InputDialog and created schema file. Try to use this custom class in bot composer, while running the application & get crashed.

Log information

at Microsoft.Bot.Builder.Dialogs.Adaptive.Input.InputDialog.<OnRenderPromptAsync>d__57.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.Bot.Builder.Dialogs.Adaptive.Input.InputDialog.<PromptUserAsync>d__59.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.Bot.Builder.Dialogs.Adaptive.Input.InputDialog.<BeginDialogAsync>d__50.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.Bot.Builder.Dialogs.DialogContext.<BeginDialogAsync>d__32.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.<BeginActionAsync>d__17.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.Bot.Builder.Dialogs.Adaptive.Actions.ActionScope.<BeginDialogAsync>d__6.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.Bot.Builder.Dialogs.DialogContext.<BeginDialogAsync>d__32.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.Bot.Builder.Dialogs.Adaptive.AdaptiveDialog.<ContinueActionsAsync>d__56.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Bot.Builder.Dialogs.Adaptive.AdaptiveDialog.<BeginDialogAsync>d__45.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.Bot.Builder.Dialogs.DialogContext.<BeginDialogAsync>d__32.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.Bot.Builder.Dialogs.DialogManager.<HandleBotOnTurnAsync>d__37.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at Microsoft.Bot.Builder.Dialogs.DialogManager.<OnTurnAsync>d__30.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Bot.Builder.Dialogs.DialogManager.<OnTurnAsync>d__30.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at Microsoft.BotFramework.Composer.Core.ComposerBot.<OnTurnAsync>d__10.MoveNext() in C:\bot-composer-sample\EchoBot-1\runtime\core\ComposerBot.cs:line 55

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
EricDahlvangcommented, Dec 23, 2020

Added a PR to throw a more meaningful exception if the .Prompt is missing: https://github.com/microsoft/botbuilder-dotnet/pull/5065

1reaction
EricDahlvangcommented, Dec 23, 2020

@rvinothrajendran this can be accomplished by overriding OnRenderPromptAsync:

        protected override async Task<IActivity> OnRenderPromptAsync(DialogContext dc, InputState state, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (this.Prompt == null)
            {
                this.Prompt = new StaticActivityTemplate(MessageFactory.Text("missing initial prompt"));
            }

            return await base.OnRenderPromptAsync(dc, state, cancellationToken).ConfigureAwait(false);
        }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Ask users for input in Bot Framework Composer
You create a text input prompt by selecting the + icon in the authoring canvas and then selecting Text input from the Ask...
Read more >
Bot Framework Composer Documentation | PDF
In this tutorial, you learn how to: Build on the basic bot created in the previous tutorial by adding an additional dialog. Run...
Read more >
Merge schemas of custom dialog - Error conflicting definitions
HelpDialog is a predefined dialog that was already present. I have installed NodeJs and @botframework-cli package because it was required from ...
Read more >
Create a Bot with Bot Framework Composer
Create a bot and customize the “welcome” dialog flow. Start the Bot Framework Composer if it's not already open. On the Home screen,...
Read more >
MediaWiki: HISTORY
As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found