Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[blazor] [wasm] Unable to debug after redirect to oidc #60613

Closed
LeandroPT opened this issue Oct 18, 2021 · 6 comments · Fixed by #60688
Closed

[blazor] [wasm] Unable to debug after redirect to oidc #60613

LeandroPT opened this issue Oct 18, 2021 · 6 comments · Fixed by #60688
Assignees
Labels
arch-wasm WebAssembly architecture area-Debugger-mono
Milestone

Comments

@LeandroPT
Copy link

Describe the bug

When on Visual Studio you start with "F5" it starts the project enter debug and it hits all breakpoints.
However, as soon there is a redirect to an external login URL (oidc) the browser closes because de Visual Studio Debugger reports a fail message and cancels debug.

To Reproduce

Start Debug and redirect to any external URI

Exceptions

Exception System.AggregateException: One or more errors occurred. (SendDebuggerAgentCommand Error - Vm - 8)  
---> System.Exception: SendDebuggerAgentCommand Error - Vm - 8    at Microsoft.WebAssembly.Diagnostics.MonoSDBHelper.SendDebuggerAgentCommandInternal(SessionId sessionId, Int32 command_set, Int32 command, MemoryStream parms, CancellationToken token)    
at Microsoft.WebAssembly.Diagnostics.MonoSDBHelper.SetProtocolVersion(SessionId sessionId, CancellationToken token)    
at Microsoft.WebAssembly.Diagnostics.MonoProxy.RuntimeReady(SessionId sessionId, CancellationToken token)    
at Microsoft.WebAssembly.Diagnostics.MonoProxy.OnDefaultContext(SessionId sessionId, ExecutionContext context, CancellationToken token)    
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.Task``1.GetResultCore(Boolean waitCompletionNotification)    
at System.Threading.Tasks.Task``1.get_Result()    
at Microsoft.WebAssembly.Diagnostics.DevToolsProxy.Run(Uri browserUri, WebSocket ideSocket)

Further technical details

  • ASP.NET Core 6.0.100-rc.2.21505.57
  • Visual Studio 2022 - Version 17.0.0 Preview 5.0
dotnet --info Output
.NET SDK (reflecting any global.json):
 Version:   6.0.100-rc.2.21505.57
 Commit:    ab39070116

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19043
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\

Host (useful for support):
  Version: 6.0.0-rc.2.21480.5
  Commit:  6b11d64e7e

.NET SDKs installed:
  3.1.414 [C:\Program Files\dotnet\sdk]
  5.0.303 [C:\Program Files\dotnet\sdk]
  5.0.401 [C:\Program Files\dotnet\sdk]
  5.0.402 [C:\Program Files\dotnet\sdk]
  6.0.100-rc.1.21458.32 [C:\Program Files\dotnet\sdk]
  6.0.100-rc.2.21505.57 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-rc.1.21452.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-rc.2.21480.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-rc.1.21451.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-rc.2.21480.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0-rc.1.21451.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0-rc.2.21501.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
@javiercn javiercn transferred this issue from dotnet/aspnetcore Oct 19, 2021
@huoyaoyuan huoyaoyuan added arch-wasm WebAssembly architecture area-Debugger-mono labels Oct 19, 2021
@ghost
Copy link

ghost commented Oct 19, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Describe the bug

When on Visual Studio you start with "F5" it starts the project enter debug and it hits all breakpoints.
However, as soon there is a redirect to an external login URL (oidc) the browser closes because de Visual Studio Debugger reports a fail message and cancels debug.

To Reproduce

Start Debug and redirect to any external URI

Exceptions

Exception System.AggregateException: One or more errors occurred. (SendDebuggerAgentCommand Error - Vm - 8)  
---> System.Exception: SendDebuggerAgentCommand Error - Vm - 8    at Microsoft.WebAssembly.Diagnostics.MonoSDBHelper.SendDebuggerAgentCommandInternal(SessionId sessionId, Int32 command_set, Int32 command, MemoryStream parms, CancellationToken token)    
at Microsoft.WebAssembly.Diagnostics.MonoSDBHelper.SetProtocolVersion(SessionId sessionId, CancellationToken token)    
at Microsoft.WebAssembly.Diagnostics.MonoProxy.RuntimeReady(SessionId sessionId, CancellationToken token)    
at Microsoft.WebAssembly.Diagnostics.MonoProxy.OnDefaultContext(SessionId sessionId, ExecutionContext context, CancellationToken token)    
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.Task``1.GetResultCore(Boolean waitCompletionNotification)    
at System.Threading.Tasks.Task``1.get_Result()    
at Microsoft.WebAssembly.Diagnostics.DevToolsProxy.Run(Uri browserUri, WebSocket ideSocket)

Further technical details

  • ASP.NET Core 6.0.100-rc.2.21505.57
  • Visual Studio 2022 - Version 17.0.0 Preview 5.0
dotnet --info Output
.NET SDK (reflecting any global.json):
 Version:   6.0.100-rc.2.21505.57
 Commit:    ab39070116

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19043
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\

Host (useful for support):
  Version: 6.0.0-rc.2.21480.5
  Commit:  6b11d64e7e

.NET SDKs installed:
  3.1.414 [C:\Program Files\dotnet\sdk]
  5.0.303 [C:\Program Files\dotnet\sdk]
  5.0.401 [C:\Program Files\dotnet\sdk]
  5.0.402 [C:\Program Files\dotnet\sdk]
  6.0.100-rc.1.21458.32 [C:\Program Files\dotnet\sdk]
  6.0.100-rc.2.21505.57 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-rc.1.21452.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-rc.2.21480.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-rc.1.21451.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-rc.2.21480.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0-rc.1.21451.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0-rc.2.21501.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Author: LeandroPT
Assignees: -
Labels:

arch-wasm, area-Debugger-mono

Milestone: -

@radical
Copy link
Member

radical commented Oct 19, 2021

cc @thaystg

@thaystg thaystg self-assigned this Oct 19, 2021
@thaystg
Copy link
Member

thaystg commented Oct 19, 2021

@LeandroPT, could you please attach/paste here the dotnet[version].js that is being used by your application? I just want to make sure that we are not hitting something that is already fixed.

image

You can click on the dotnet[version].js file and then copy and paste the content here. Also sending me the full name of dotnet.js file would also help me.

@thaystg
Copy link
Member

thaystg commented Oct 19, 2021

Oh, I don't need this information anymore, I could reproduce.

@LeandroPT
Copy link
Author

Então @thaystg está do vosso lado certo?
"So Thays it is on your side correct?"

@thaystg
Copy link
Member

thaystg commented Oct 19, 2021

hahahah!!
Sim, está do meu lado, estou tentando corrigir. Obrigada por reportar!
Yes, it's on my side, I'm trying to fix it! Thanks for reporting!

@lewing lewing added this to the 7.0.0 milestone Oct 19, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 20, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 22, 2021
@ghost ghost added in-pr There is an active PR which will close this issue when it is merged and removed in-pr There is an active PR which will close this issue when it is merged labels Oct 22, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Debugger-mono
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants