-
-
Notifications
You must be signed in to change notification settings - Fork 189
[Bug] ObjectDisposedException while navigating between Interactive to StreamRendering mode in Blazor Web App #594
Description
Describe the bug
It throws an unhandled ObjectDisposedException while navigating between Interactive to StreamRendering mode in Blazor Web App, because of the exception the application gets into an error state. The stack trace is below:
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Microsoft.JSInterop.WebAssembly.WebAssemblyJSObjectReference'. at Microsoft.JSInterop.Implementation.JSObjectReference.ThrowIfDisposed() at Microsoft.JSInterop.Implementation.JSObjectReference.InvokeAsync[IJSVoidResult](String identifier, Object[] args) at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args) at Blazored.Modal.BlazoredModal.ClearBodyStyles() at Blazored.Modal.BlazoredModal.CancelModals(Object sender, LocationChangedEventArgs e) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state) at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.ThreadPool.BackgroundJobHandler()
To Reproduce
Steps to reproduce the behavior:
- Navigate to a page with
rendermode = InteractiveWebAssembly - Navigate back to a page with
rendermode = StreamRendering - Try to Navigate to some other page
- The application will be in error state then
Expected behavior
A clear and concise description of what you expected to happen.
Hosting Model (is this issue happening with a certain hosting model?):
- Blazor Web App (Blazor United)