diff --git a/src/Aspire.Dashboard/Components/Interactions/InteractionsProvider.cs b/src/Aspire.Dashboard/Components/Interactions/InteractionsProvider.cs index 497d7ef82b7..ceca45ce4df 100644 --- a/src/Aspire.Dashboard/Components/Interactions/InteractionsProvider.cs +++ b/src/Aspire.Dashboard/Components/Interactions/InteractionsProvider.cs @@ -108,6 +108,12 @@ protected override void OnInitialized() { try { + // There is a bug in FluentDialogProvider that causes it to error if used immediately because it's still loading its own JavaScript. + // Wait a small amount of time for it to get ready. Add the delay here because it only impacts displaying dialogs. Still want to display message bars immediately. + // + // TODO: Remove when https://github.com/microsoft/fluentui-blazor/issues/4311 is fixed. + await Task.Delay(TimeSpan.FromSeconds(2)); + await InteractionsDisplayAsync().ConfigureAwait(false); } catch (Exception ex) when (!_cts.IsCancellationRequested)