Hi There,
I have a page that's got a 3-4 different custom Blazor components (mine), and some of those components have SFDIALOGS in them. I have noticed lately (since 18.2.47, and also in 18.2.48) that the following random exception gets thrown when I visit the page. It does not always happen, but it does occur quite regularly, usually about 30-45 s after the page loads. It happens when I don't interact with the dialogs at all.
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'KDA1ZMSBJc-0TqzIJta-U-gWcIfKvkf-GhvzOAGDOaE'.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation[T](String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at Syncfusion.Blazor.SfBaseComponent.InvokeMethod(String methodName, Object[] methodParams)
at Syncfusion.Blazor.Popups.SfDialog.ComponentDispose()
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
Any ideas on how I can prevent this?
Here is (one of the) dialogs:
<SfDialog @bind-Visible="@IsVisible" Width="250px" ShowCloseIcon="false" IsModal="true">
<DialogTemplates>
<Header>@Header</Header>
<Content>@((MarkupString)Content)</Content>
</DialogTemplates>
<DialogButtons>
<DialogButton OnClick="@OkClick">
<DialogButtonModel Content="OK" IsPrimary="true"></DialogButtonModel>
</DialogButton>
<DialogButton OnClick="@CancelClick">
<DialogButtonModel Content="Cancel"></DialogButtonModel>
</DialogButton>
</DialogButtons>
</SfDialog>
Thanks
Joseph