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

Errors debugging Aspire in VS Code on Mac after upgrading to Sequoia #5860

Closed
jeffa00 opened this issue Sep 23, 2024 Discussed in #5822 · 17 comments
Closed

Errors debugging Aspire in VS Code on Mac after upgrading to Sequoia #5860

jeffa00 opened this issue Sep 23, 2024 Discussed in #5822 · 17 comments
Labels
area-tooling vs-code Issues related to vs code tooling for aspire

Comments

@jeffa00
Copy link

jeffa00 commented Sep 23, 2024

Discussed in #5822

Originally posted by jeffa00 September 21, 2024
After upgrading to Sequoia I get an error trying to start debugging on the AppHost project.

The specific error I get is "The JSON-RPC connection with the remote party was lost before the request could complete."

Google and Bing haven't yielded much help. I find a similar error in Visual Studio from back in 2019ish, but nothing recent.

I've uninstalled extensions, then VS Code, but no joy.

I can debug the web app just fine, but the error always occurs when trying to start AppHost.

I'm trying to figure out if it is indeed something in Sequoia. I have a work mac with Sonoma that doesn't have the issue.

Just curious if anyone else has seen this or if I'm just super lucky. :-)

@jeffa00
Copy link
Author

jeffa00 commented Sep 23, 2024

FYI I am on an M2, so Apple silicon. Someone else replied in the discussion topic I originally created that on an Intel Mac, he is not experiencing the same error.

@RobertWeaver
Copy link

I also have the same issue. M1 with Aspire 8.2.0

Here is what I can see...
image

My dotnet --info

.NET SDK:
 Version:           9.0.100-rc.1.24452.12
 Commit:            81a714c6d3
 Workload version:  9.0.100-manifests.67cd1eb6
 MSBuild version:   17.12.0-preview-24422-09+d17ec720d

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  15.0
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/9.0.100-rc.1.24452.12/

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
 [aspire]
   Installation Source: SDK 9.0.100-rc.1
   Manifest Version:    8.2.0/8.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.aspire/8.2.0/WorkloadManifest.json
   Install Type:        FileBased


Host:
  Version:      9.0.0-rc.1.24431.7
  Architecture: arm64
  Commit:       static

.NET SDKs installed:
  8.0.401 [/usr/local/share/dotnet/sdk]
  9.0.100-rc.1.24452.12 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.0-rc.1.24452.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.0-rc.1.24431.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

@captainsafia
Copy link
Member

I'm seeing the same thing on Apple Silicon (M2) as well. Issue seems to have shown up after the Sequoia upgrade as well. Similar to you, I can debug test cases and other non-Aspire apps fine so I suspect that the bug is manifesting from the Aspire-specific debugging hooks?

I can provide logs but not sure what the right log source is for these specific issues.

cc: @WardenGnaw for any insights on logs we can gather or people we can loop in

@WardenGnaw
Copy link

"The JSON-RPC connection with the remote party was lost before the request could complete" is generally something failed with brokered service communication.

I don't think we have specific logs for this section unless you see an actual debug session start.

Things that could be helpful for this investigation:

  • The version of C# Extension + C# Dev Kit used.
  • Is the AppHost not starting to debug or are the projects listed under the AppHost not starting to debug?

@captainsafia
Copy link
Member

I was able to repro this on both the pre-release and release builds of the extensions.

C# extension version: v2.48.31 (pre-release), v2.45.25
C# Dev Kit version: v1.11.9 (pre-release), v1.10.18

The AppHost itself is not starting to debug.

@jeffa00
Copy link
Author

jeffa00 commented Sep 24, 2024

C#: v2.45.25
C# Dev Kit: v1.10.18

image

The AppHost fails to start, but other apps can start (example an ASP app).

@jeffa00
Copy link
Author

jeffa00 commented Sep 24, 2024

Also, can run AppHost from the CLI.

@smitpatel
Copy link
Contributor

Likely root cause dotnet/announcements#324
AspireServerService is failing to start due to above.

@RobertWeaver
Copy link

After trying the workaround here dotnet/runtime#106775 (comment) I can now launch the dashboard and everything in debug mode but I cannot hit any breakpoints? I did try to add the "requireExactSource" but that does not work either.

image

@kamalraj2000
Copy link

I am also running into this issue on a M3 Mac. It started after upgrading to Sequoia.

C# Dev Kit: v1.10.18
C# Extension: v2.45.25

I can run the AppHost from CLI but not when launching through VSCode debug mode.

@Fiontan
Copy link

Fiontan commented Sep 30, 2024

Same- M3, all good until latest OSequoia upgrade

@davidfowl davidfowl added the vs-code Issues related to vs code tooling for aspire label Oct 7, 2024
@DamianEdwards
Copy link
Member

The fix for this issue in the .NET SDK was included in today's releases of .NET 8.0.10 and .NET 9.0-rc.2. Would be good if someone can upgrade and confirm the issue is fixed for them.

@captainsafia
Copy link
Member

I'm able to debug my Aspire apps after upgrading. Would be good to get confirmation from other folks as well.

@xtqqczze
Copy link

xtqqczze commented Oct 9, 2024

8.0.403 was just released that does fix this.

But you need to run:

dotnet dev-certs https --clean

dotnet dev-certs https --trust

And then you should be back in business.

Originally posted by @jhancock-taxa in #9532

@webreidi
Copy link

My debugging works after upgrading as well.

@joperezr joperezr added the untriaged New issue has not been triaged label Oct 15, 2024
@davidfowl davidfowl removed the bug label Oct 16, 2024
@kamalraj2000
Copy link

I am also confirming that Aspire debugging is working on a M3 Mac after upgrading to .NET 8.0.10

@DamianEdwards
Copy link
Member

Thanks for the confirmations folks. Closing this out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-tooling vs-code Issues related to vs code tooling for aspire
Projects
None yet
Development

No branches or pull requests