My blazor app crashes at startup when debugging. If I start it without the debugger it works ok. This happened on march 15 after .net 6.0.15 updates.
This is the trace:
Microsoft.WebAssembly.Diagnostics.DevToolsProxy[0] DevToolsProxy::Run: Exception System.AggregateException: One or more errors occurred. (Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')) ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at System.Collections.Generic.List
1.get_Item(Int32 index) at Newtonsoft.Json.Linq.JContainer.GetItem(Int32 index) at Newtonsoft.Json.Linq.JArray.get_Item(Object key) at Microsoft.WebAssembly.Diagnostics.MonoProxy.AcceptEvent(SessionId sessionId, String method, JObject args, CancellationToken token) at Microsoft.WebAssembly.Diagnostics.DevToolsProxy.OnEvent(SessionId sessionId, String method, JObject args, CancellationToken token) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at Microsoft.WebAssembly.Diagnostics.DevToolsProxy.Run(Uri browserUri, WebSocket ideSocket)
Googled and no results found for this issue. Tried to update nuget packages to 6.0.15 and no results.
There seems to be an issue with the recent Update, see related discussion
A fix for me was to remove all breakpoints from code. From the Debug menu, choose Clear All Breakpoints (CTRL+SHIFT+F9)
Link
Its fixed in the latest version of Edge.. Version 111.0.1661.44 (Official build) (64-bit)
Update your Edge installation to the latest version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With