MudBlazor: MudOverlay: unhandled JS exception in Dispose
Bug type
Component
Component name
MudOverlay
What happened?
MudOverlay calls ScrollManager.UnlockScrollAsync in its Dispose which causes an unhandled JS exception.

Expected behavior
No unhandled exceptions are thrown when MudOverlay (MudDrawer) is disposed.
Reproduction link
https://github.com/jasongdove/MudBlazorRepro1
Reproduction steps
- Start debugging
- Enable all CLR Exceptions in
Exception Settings curlthe home page
Relevant log output
Exception thrown: 'System.InvalidOperationException' in Microsoft.AspNetCore.Components.Server.dll
JavaScript interop calls cannot be issued at this time. This is because the component is being statically rendered. When prerendering is enabled, JavaScript interop calls can only be performed during the OnAfterRenderAsync lifecycle method.
Exception thrown: 'System.InvalidOperationException' in Microsoft.JSInterop.dll
JavaScript interop calls cannot be issued at this time. This is because the component is being statically rendered. When prerendering is enabled, JavaScript interop calls can only be performed during the OnAfterRenderAsync lifecycle method.
Exception thrown: 'System.Net.Sockets.SocketException' in System.Net.Sockets.dll
An existing connection was forcibly closed by the remote host.
Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll
JavaScript interop calls cannot be issued at this time. This is because the component is being statically rendered. When prerendering is enabled, JavaScript interop calls can only be performed during the OnAfterRenderAsync lifecycle method.
Version (bug)
6.0.7
Version (working)
No response
What browsers are you seeing the problem on?
Other
On what operating system are you experiencing the issue?
Other
Pull Request
- I would like to do a Pull Request
Code of Conduct
- I agree to follow this project’s Code of Conduct
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 19 (10 by maintainers)
@jasongdove Do you have time to test the PR?
@jasongdove I missed the significance of the call stack sorry. Will fix now. Im still interested as to why exceptions arent outputed to the debug window. I tried with our docs and they are. Very strange.