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

Failed to download .NET runtime 5.0.4 on Apple Silicon #201

Open
bturkenburg opened this issue Mar 22, 2021 · 12 comments
Open

Failed to download .NET runtime 5.0.4 on Apple Silicon #201

bturkenburg opened this issue Mar 22, 2021 · 12 comments

Comments

@bturkenburg
Copy link

when installing extension bicep with a dependency on dotnet-runtime... error: failed to download .NET runtime 5.0.4 on Apple Silicon

@sfoslund
Copy link
Member

@bturkenburg can you please provide more information on what the error is? It would be helpful if you could provide repro steps and log files.

@bturkenburg
Copy link
Author

bturkenburg commented Mar 22, 2021

When opening a .bicep file it tries to load the bicep extension, this extension has a dependency on dotnet-runtime. The error message is:

An error occurred while installing .NET (5.0): .NET Acquisition Failed: Installation failed: Error: Command failed: "/Users/username/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.0.0/dist/install scripts/dotnet-install.sh" -InstallDir "/Users/username/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/5.0.4" -Runtime dotnet -Version 5.0.4 dotnet_install: Error: Could not find .NET Core Runtime with version = 5.0.4 dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support

Also getting below information in the output window:
info: Current log level: debug.
info: Launching Bicep language service...
info: Acquiring dotnet runtime...
Error: Failed to install .NET runtime v5.0.
error: Failed to install .NET runtime v5.0.

@sfoslund
Copy link
Member

dotnet_install: Error: Could not find .NET Core Runtime with version = 5.0.4 dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support

@bozturkMSFT this error looks familiar to me, do you know what the cause is offhand?

@bekir-ozturk
Copy link

bekir-ozturk commented Mar 26, 2021

Unfortunately, no. This is an error we show when the generated url returned a 404 status code:
https://github.com/dotnet/install-scripts/blob/7cc735f5c9f4e10f142723d42b8e8f060ccf0049/src/dotnet-install.sh#L945-L948

It seems likely that the detected architecture is wrong and we are trying to download something that doesn't exist. Is it possible to get more detailed logs?

@sfoslund
Copy link
Member

@bturkenburg can you provide the runtime extension logs? They're located at c:\Users\{ USERNAME }\AppData\Roaming\Code\logs\{ DATE }\exthost1\ms-dotnettools.vscode-dotnet-runtime\DotNetAcquisition{ GUID }.txt

@bturkenburg
Copy link
Author

To solve this problem I'm using now remote dev containers...

@torumakabe
Copy link

@sfoslund I got a similar error. The followings are the info of my VS Code env.

Version: 1.55.1 (Universal)
Commit: 08a217c4d27a02a5bcde898fd7981bda5b49391b
Date: 2021-04-07T18:22:52.186Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin arm64 20.3.0

The error occurs when I use Azure Resource Manager Template Tools extension.

This extension requires .NET Core for full functionality, but we were unable to download and install a local copy for the extension. If this error persists, please see https://aka.ms/vscode-armtools-dotnet for troubleshooting tips.
Details: dotnet.acquire failed
See '.NET Runtime' in the output window for more information.

I pasted the error log of extension on my gist, so could you please check it? Thanks.

@sfoslund
Copy link
Member

dotnet-install: The resource at https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.13/dotnet-osx-arm64.3.1.13.tar.gz is not available.

It looks like osx-arm64 is not a valid platform, that runtime doesn't exist. @bozturkMSFT could this be a bug with how the install scripts resolve the platform?

@mikkelhegn
Copy link

Below is a case of trying to use the Bicep extension and dotnet 5.0.5.

It looks like only .net 6.0 has a runtime supported for macos arm64 at this point:
6.0: https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md#macos
5.0: https://github.com/dotnet/core/blob/main/release-notes/5.0/5.0-supported-os.md#macos
3.1: https://github.com/dotnet/core/blob/main/release-notes/3.1/3.1-supported-os.md#macos

4/13/2021, 10:37:08 PM DotnetAcquisitionScriptOuput
5.0.5
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to ge$

dotnet-install: Downloading primary link https://dotnetcli.azureedge.net/dotnet/Runtime/5.0.5/dotnet-runtime-5.0.5-osx-arm64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at https://dotnetcli.azureedge.net/dotnet/Runtime/5.0.5/dotnet-runtime-5.0.5-osx-arm64.tar.gz is not available.
dotnet-install: Downloading legacy link https://dotnetcli.azureedge.net/dotnet/Runtime/5.0.5/dotnet-osx-arm64.5.0.5.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at https://dotnetcli.azureedge.net/dotnet/Runtime/5.0.5/dotnet-osx-arm64.5.0.5.tar.gz is not available.


4/13/2021, 10:37:08 PM DotnetAcquisitionScriptOuput
5.0.5
STDERR: dotnet_install: Error: Could not find `.NET Core Runtime` with version = 5.0.5
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support


4/13/2021, 10:37:08 PM DotnetAcquisitionInstallError
Command failed: "/Users/mikkel/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-1.0.0/dist/install scripts/dotnet-install.sh" -InstallDir "/Users/mikk$
dotnet_install: Error: Could not find `.NET Core Runtime` with version = 5.0.5

@elringus
Copy link

Judging by dotnet/core#4879 (comment) it's not even planned to support arm-based macs on .net 3.1 or 5.0, no wonder the runtime fails to install in such cases. It'd help a lot if vscode-dotnet-runtime will inform the user that they need to use Rosetta 2 emulator to use an extension, which they try to install the runtime for.

@agocke
Copy link
Member

agocke commented Jul 1, 2021

The problem is that this extension is trying to install the osx-arm64 dotnet for target frameworks <= 5.0. There is no such RID. The extension needs to recognize that the running platform is ARM64 but the requested TF is <= 5.0 and, if so, use the x64 arch instead.

@sfoslund
Copy link
Member

sfoslund commented Jul 1, 2021

@bekir-ozturk I believe that the logic for determining the RID is in the install scripts to the logic that @agocke outlined should be in there too. Should I transfer this issue to the install scripts repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants