title: DisplayPromptAsync hangs on Uno Platform for Xamarin Forms WASM
body: <p>I have an application that works on UWP. It contains this piece of code:</p>
  <pre><code>        private async void Button_Clicked(object sender, EventArgs e)
          {
              var response1 = await App.Current.MainPage.DisplayPromptAsync(&quot;&quot;, &quot;message1&quot;, &quot;OK&quot;, &quot;Cancel&quot;, &quot;&quot;);
              if (string.IsNullOrEmpty(response1)) return;
              var response2 = await App.Current.MainPage.DisplayPromptAsync(&quot;&quot;, &quot;message2&quot;, &quot;OK&quot;, &quot;Cancel&quot;, &quot;&quot;);
              if (string.IsNullOrEmpty(response2)) return;
          }
  </code></pre>
  <p>The code works properly on UWP. However, on Uno for WASM, only the first response is captured properly. The second response hangs the web application completely.</p>
  <p>Looking at the console, it might be a threading error, <strong>AFTER</strong> I press the OK button for the first prompt:</p>
  <pre><code>  Failed to raise 'PointerReleasedEvent': System.InvalidOperationException
  dotnet.js:1         at System.Threading.Tasks.TaskCompletionSource`1[TResult].SetResult (TResult result) [0x00009] in /__w/1/s/mono/external/corefx/src/Common/src/CoreLib/System/Threading/Tasks/TaskCompletionSource.cs:298 
  dotnet.js:1         at Windows.UI.Xaml.Controls.ContentDialog.&lt;ProcessPrimaryButton&gt;g__Complete|52_0 (Windows.UI.Xaml.Controls.ContentDialogButtonClickEventArgs a) [0x00022] in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\ContentDialog\ContentDialog.cs:355 
  dotnet.js:1         at Windows.UI.Xaml.Controls.ContentDialog.ProcessPrimaryButton () [0x0002d] in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\ContentDialog\ContentDialog.cs:365 
  dotnet.js:1         at Windows.UI.Xaml.Controls.ContentDialog.OnPrimaryButtonClicked (System.Object sender, Windows.UI.Xaml.RoutedEventArgs e) [0x00000] in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\ContentDialog\ContentDialog.cs:291 
  dotnet.js:1         at (wrapper delegate-invoke) &lt;Module&gt;.invoke_void_object_RoutedEventArgs(object,Windows.UI.Xaml.RoutedEventArgs)
  dotnet.js:1         at Windows.UI.Xaml.Controls.Primitives.ButtonBase.OnClick (Windows.UI.Xaml.Input.PointerRoutedEventArgs args) [0x00000] in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Primitives\ButtonBase\ButtonBase.cs:304 
  dotnet.js:1         at Windows.UI.Xaml.Controls.Primitives.ButtonBase.RaiseClick (Windows.UI.Xaml.Input.PointerRoutedEventArgs args) [0x00000] in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Primitives\ButtonBase\ButtonBase.cs:294 
  dotnet.js:1         at Windows.UI.Xaml.Controls.Primitives.ButtonBase.OnPointerReleased (Windows.UI.Xaml.Input.PointerRoutedEventArgs args) [0x00065] in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Primitives\ButtonBase\ButtonBase.cs:266 
  dotnet.js:1         at Windows.UI.Xaml.Controls.Control+&lt;&gt;c.&lt;.cctor&gt;b__346_11 (System.Object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs args) [0x00000] in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Control\Control.cs:865 
  dotnet.js:1         at Windows.UI.Xaml.UIElement.InvokeHandler (System.Object handler, Windows.UI.Xaml.RoutedEventArgs args) [0x000e7] in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.RoutedEvents.cs:826 
  dotnet.js:1         at Windows.UI.Xaml.UIElement.RaiseEvent (Windows.UI.Xaml.RoutedEvent routedEvent, Windows.UI.Xaml.RoutedEventArgs args, Windows.UI.Xaml.UIElement+BubblingContext ctx) [0x0007f] in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.RoutedEvents.cs:613 
  dotnet.js:1         at Windows.UI.Xaml.UIElement.RaisePointerEvent (Windows.UI.Xaml.RoutedEvent evt, Windows.UI.Xaml.Input.PointerRoutedEventArgs args) [0x0000d] in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.Pointers.cs:933 
  </code></pre>
  <p>So what am I doing wrong here? How to properly display two consecutive prompts on an event to make in run on Uno?</p>