dotnet / vscode-dotnet-runtime

VSCode Extension for Installing .NET via VS Code
MIT License
128 stars 229 forks source link

Error acquiring .NET #1729

Open Boyfinn opened 3 months ago

Boyfinn commented 3 months ago

Describe the bug.

I'm on Linux Mint 21.3, kernel version 6.5.0. My installed .net SDK:s are-

I'm getting an error whenever creating / opening a new Avalonia app. I have the Avalonia for VSCode extension installed, and I get an error when acquiring .NET. The console output for the error:

AvaloniaTeam.vscode-avalonia requested to download the .NET Runtime.
Downloading .NET version(s) 8.0.3~x64 ....Error
Failed to download .NET 8.0:
Web Request to https://dot.net/v1/dotnet-install.sh Failed: n[r].split is not a function. Aborting. Please ensure that you are online.

Error
Failed to download .NET 8.0:
Web Request to https://dot.net/v1/dotnet-install.sh Failed: n[r].split is not a function. Aborting. Please ensure that you are online.

Error
Failed to download .NET 8.0.3~x64:
Command failed: "/home/boyfinn/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.3/dist/install scripts/dotnet-install.sh" -InstallDir "/home/boyfinn/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/8.0.3~x64" -Version 8.0.3 -Verbose -Runtime dotnet -Architecture x64
/bin/sh: 1: /home/boyfinn/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.3/dist/install scripts/dotnet-install.sh: Permission denied

Error
Failed to download .NET 8.0:
.NET Acquisition Failed: Installation failed: Error: Command failed: "/home/boyfinn/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.3/dist/install scripts/dotnet-install.sh" -InstallDir "/home/boyfinn/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/8.0.3~x64" -Version 8.0.3 -Verbose -Runtime dotnet -Architecture x64
/bin/sh: 1: /home/boyfinn/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.3/dist/install scripts/dotnet-install.sh: Permission denied

Any other .NET SDK project seems to work just fine.

Please attach log file(s) here if you have any.

The log file location should be copied to your clipboard if you came from VS Code.

Reproduction Steps

  1. Install .NET SDK:s.
  2. Install C# language extensions and tools for VSCode.
  3. Install Avalonia for VSCode extension.
  4. Try to create or open an Avalonia project with .NET version 8.0.

Expected Behavior

Extensions should be aware of the dotnet SDK path.

Exceptions & Errors (if any)

No response

.NET Install Tool Version

v2.0.3

Your operating system? Please provide more detail, such as the version and or distro above.

Linux

VS Code Version

1.87.2

nagilson commented 2 months ago

I think this is a problem with axios or the cache interceptor. We collect more information about this error in an upcoming version, we will need to be able to investigate this.

sfjuocekr commented 1 month ago
AvaloniaTeam.vscode-avalonia requested to download the .NET Runtime.
Downloading .NET version(s) 8.0.4~x64 ....Error
Failed to download .NET 8.0:
Web Request to https://dot.net/v1/dotnet-install.sh Failed: n[r].split is not a function. Aborting. Please ensure that you are online.

Error
Failed to download .NET 8.0:
Web Request to https://dot.net/v1/dotnet-install.sh Failed: n[r].split is not a function. Aborting. Please ensure that you are online.

Error
Failed to download .NET 8.0.4~x64:
Command failed: "/home/sjoer/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.3/dist/install scripts/dotnet-install.sh" -InstallDir "/home/sjoer/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/8.0.4~x64" -Version 8.0.4 -Verbose -Runtime dotnet -Architecture x64
/bin/sh: 1: /home/sjoer/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.3/dist/install scripts/dotnet-install.sh: Permission denied

Error
Failed to download .NET 8.0:
.NET Acquisition Failed: Installation failed: Error: Command failed: "/home/sjoer/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.3/dist/install scripts/dotnet-install.sh" -InstallDir "/home/sjoer/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/8.0.4~x64" -Version 8.0.4 -Verbose -Runtime dotnet -Architecture x64
/bin/sh: 1: /home/sjoer/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.0.3/dist/install scripts/dotnet-install.sh: Permission denied

Same on my system running Ubuntu!

nagilson commented 1 month ago

@sfjuocekr Does this repro on the version we released today, 2.0.5? If so, the error message should provide some more detail now, may you please report it?

Boyfinn commented 1 month ago

I've determined this might be more of an issue with both Avalonia and the Avalonia extension for VSCode. .NET projects and applications open, build and run flawlessly without these dependencies. I don't have any intention of using Avalonia anymore, But I'll bring this up on Avalonia's issues page. Feel free to close this issue if nobody else has anything to further discuss on this matter.