-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Everything was working perfectly over the weekend, I updated Visual Studio to 17.5.1 - On Monday I could no longer debug my Blazor application. It looks like it errors when redirecting to auth server. I have managed to obtain the following error from Console.
I've tried rolling back and uninstalling, working on different branches. Visual Studio. everything!!!
I am still running on .net 6 with most Nuget packages @ 6.0.15 I don't really want to upgrade to .net 7 as it's not LTS.
fail: 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.List1.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)
I have since tried updating my project to .net 7 and all the Nuget packages to 7.0.4 and the problem still persists.
Also, it looks like I am not the one with this problem, there are lots of people reporting the same here. https://learn.microsoft.com/en-us/answers/questions/1189857/blazor-app-crashes-when-debugging-after-windows-se?comment=question#comment-1230302
Expected Behavior
To be able to run my Blazor WASM application
Steps To Reproduce
Build a Blazor WASM project with authentication in .net 6 and run it on a system which has been recently updated to VS > 17.5.1
Exceptions (if any)
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.List1.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)
.NET Version
7.0.202