NuGet / Home

Repo for NuGet Client issues
Other
1.5k stars 253 forks source link

[NETSDKE2E][Unstable]Failed to download package 'Microsoft.NETCore.app.Runtime.win-x64.8.0.0' from ..." message displays during publish project in CLI. #13125

Open vdanche opened 9 months ago

vdanche commented 9 months ago

NuGet Product Used

dotnet.exe

Product Version

SDK version from dotnet --info: 8.0.200-preview.24053.15

Worked before?

No response

Impact

None

Repro Steps & Context

1.install 8.0.200-preview.24053.15 sdk from https://aka.ms/dotnet/8.0.2xx/daily/dotnet-sdk-win-x64.exe in CLI, dotnet new console and then dotnet publish -r win-x64 --self-contained

Expected Result: Publish successfully. Actual Result: Publish successfully, but "Failed to download package 'Microsoft.NETCore.app.Runtime.win-x64.8.0.0' from ..." message displays during publish project in CLI. image

.NET SDK: Version: 8.0.200-preview.24053.15 Commit: e7e0a0b72b Workload version: 8.0.200-manifests.9f3f18d7

Runtime Environment: OS Name: Windows OS Version: 10.0.19045 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.200-preview.24053.15\

.NET workloads installed: There are no installed workloads to display.

Host: Version: 8.0.0 Architecture: x64 Commit: 5535e31a71

.NET SDKs installed: 8.0.200-preview.24053.15 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.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

Verbose Logs

No response

vdanche commented 9 months ago

@martinrrm We met this issue again. our repro VM: 10.158.80.228, you can login with your email account(domain). This issue only happens when use SDK at the first time. if you want to repro again, need to delete the related files as below: image

Addtionally, the package from "https://api.nuget.org/v3-flatcontainer /microsoft.netcore.app.runtime.win-x64/8.0.0/microsoft.netcore.app.runtime.win-x64.8.0.0.nupkg" can be downloaded via browser. image

donnie-msft commented 9 months ago

Hello, this sounds like potentially an SSL/TLS configuration error. Do you have an HTTP proxy configured? Which version of TLS is your system using?

vdanche commented 9 months ago

@donnie-msft we did not have an HTTP proxy configured, only a clean win10 OS. we did not meet on win11 OS. The version of LTS that you mean is as below? image

Unfortunately, on last Friday's VM(10.158.80.228), we could not repro now 😔. today we prepare a new VM(10.214.92.19) which you can login with your email/PWD in case you need, and it can repro with below steps: 1.Unzip the format project from https://github.com/dotnet/format/blob/main/test-plan.md format.zip

  1. access to format directory in CMD
  2. Run "Restore.cmd" below package failed to download during restore image

C:\Users\v-danche\format\format>Restore.cmd GET https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1 Attempting to install 'sdk v9.0.100-alpha.1.23615.4' from public location. dotnet-install: Remote file https://dotnetbuilds.azureedge.net/public/Sdk/9.0.100-alpha.1.23615.4/dotnet-sdk-9.0.100-alpha.1.23615.4-win-x64.zip size is 282858641 bytes. dotnet-install: Downloaded file https://dotnetbuilds.azureedge.net/public/Sdk/9.0.100-alpha.1.23615.4/dotnet-sdk-9.0.100-alpha.1.23615.4-win-x64.zip size is 282858641 bytes. dotnet-install: The remote and local file sizes are equal. dotnet-install: Extracting the archive. dotnet-install: Adding to current process PATH: "C:\Users\v-danche\format\format.dotnet\". Note: This change will not be visible if PowerShell was run as a child process. dotnet-install: Note that the script does not resolve dependencies during installation. dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install/windows#dependencies dotnet-install: Installed version is 9.0.100-alpha.1.23615.4 dotnet-install: Installation finished Determining projects to restore... Restored C:\Users\v-danche.nuget\packages\microsoft.dotnet.arcade.sdk\9.0.0-beta.23615.2\tools\Tools.proj (in 5.46 s ec). Determining projects to restore... Failed to download package 'Microsoft.AspNetCore.App.Runtime.win-x86.9.0.0-alpha.1.23614.6' from 'https://pkgs.dev.az ure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/mi crosoft.aspnetcore.app.runtime.win-x86/9.0.0-alpha.1.23614.6/microsoft.aspnetcore.app.runtime.win-x86.9.0.0-alpha.1.2 3614.6.nupkg'. The decryption operation failed, see inner exception. The specified data could not be decrypted. Failed to download package 'Microsoft.WindowsDesktop.App.Runtime.win-x64.9.0.0-alpha.1.23613.1' from 'https://pkgs.de v.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat 2/microsoft.windowsdesktop.app.runtime.win-x64/9.0.0-alpha.1.23613.1/microsoft.windowsdesktop.app.runtime.win-x64.9.0 .0-alpha.1.23613.1.nupkg'. The decryption operation failed, see inner exception. The specified data could not be decrypted. Failed to download package 'Microsoft.NETCore.App.Host.osx-x64.9.0.0-alpha.1.23614.10' from 'https://pkgs.dev.azure.c om/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/microso ft.netcore.app.host.osx-x64/9.0.0-alpha.1.23614.10/microsoft.netcore.app.host.osx-x64.9.0.0-alpha.1.23614.10.nupkg'. The decryption operation failed, see inner exception. The specified data could not be decrypted. Failed to download package 'Microsoft.AspNetCore.App.Runtime.osx-x64.9.0.0-alpha.1.23614.6' from 'https://pkgs.dev.az ure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/mi crosoft.aspnetcore.app.runtime.osx-x64/9.0.0-alpha.1.23614.6/microsoft.aspnetcore.app.runtime.osx-x64.9.0.0-alpha.1.2 3614.6.nupkg'. The decryption operation failed, see inner exception. The specified data could not be decrypted. Failed to download package 'Microsoft.NETCore.App.Runtime.osx-x64.9.0.0-alpha.1.23614.10' from 'https://pkgs.dev.azur e.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/micr osoft.netcore.app.runtime.osx-x64/9.0.0-alpha.1.23614.10/microsoft.netcore.app.runtime.osx-x64.9.0.0-alpha.1.23614.10 .nupkg'. The decryption operation failed, see inner exception. The specified data could not be decrypted. Failed to download package 'Microsoft.AspNetCore.App.Runtime.win-x86.9.0.0-alpha.1.23614.6' from 'https://pkgs.dev.az ure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/mi crosoft.aspnetcore.app.runtime.win-x86/9.0.0-alpha.1.23614.6/microsoft.aspnetcore.app.runtime.win-x86.9.0.0-alpha.1.2 3614.6.nupkg'. An error occurred while sending the request. The decryption operation failed, see inner exception. The specified data could not be decrypted. Failed to download package 'Microsoft.NETCore.App.Runtime.osx-x64.9.0.0-alpha.1.23614.10' from 'https://pkgs.dev.azur e.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/micr osoft.netcore.app.runtime.osx-x64/9.0.0-alpha.1.23614.10/microsoft.netcore.app.runtime.osx-x64.9.0.0-alpha.1.23614.10 .nupkg'. An error occurred while sending the request. The read operation failed, see inner exception. Cannot determine the frame size or a corrupted frame was received. Failed to download package 'Microsoft.NETCore.App.Runtime.osx-x64.9.0.0-alpha.1.23614.10' from 'https://pkgs.dev.azur e.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat2/micr osoft.netcore.app.runtime.osx-x64/9.0.0-alpha.1.23614.10/microsoft.netcore.app.runtime.osx-x64.9.0.0-alpha.1.23614.10 .nupkg'. An error occurred while sending the request. The read operation failed, see inner exception. Cannot determine the frame size or a corrupted frame was received. Failed to download package 'Microsoft.WindowsDesktop.App.Runtime.win-x64.9.0.0-alpha.1.23613.1' from 'https://pkgs.de v.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a54510f9-4b2c-4e69-b96a-6096683aaa1f/nuget/v3/flat 2/microsoft.windowsdesktop.app.runtime.win-x64/9.0.0-alpha.1.23613.1/microsoft.windowsdesktop.app.runtime.win-x64.9.0 .0-alpha.1.23613.1.nupkg'. The decryption operation failed, see inner exception. The specified data could not be decrypted. Restored C:\Users\v-danche\format\format\perf\dotnet-format.PerformanceTests.csproj (in 35.19 sec). Restored C:\Users\v-danche\format\format\tests\dotnet-format.UnitTests.csproj (in 35.23 sec). Restored C:\Users\v-danche\format\format\src\dotnet-format.csproj (in 35.25 sec).

Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:00:42.32

donnie-msft commented 9 months ago

@vdanche - I logged into your VM, and restore worked for me. image

I don't know why this worked for me, and I don't understand why you experienced that error.

I tried a TLS check using a tool written by someone on our team, and it seems that TLS 1.2 was configured, which should work with nuget.org. TLS 1.3 is not enabled on your system, which is good because it's not supported by nuget.org (https://github.com/NuGet/NuGetGallery/issues/9655).

\bin\Debug\net8.0>api.nuget.org-tls-test.exe None worked Ssl2 failed Ssl3 failed Tls failed Default failed Tls11 failed Tls12 worked Tls13 failed

Could you let us know if you experience this again? It's likely some transient network issue, or perhaps a Windows network configuration problem, if I had to guess.

vdanche commented 9 months ago

@donnie-msft It's so strange that the issue not repro again when we login with a new domain account into yesterday's VM, image but we re-created two new VM win10, it repro again😟 image

Additionally, I have a confusion that in your result screenshot, why the file directory is "c:\Users\v-danche\format" not "c\Users\eagoodso" as actually you login with your domain account? image

donnie-msft commented 9 months ago

Could you check the TLS configuration on your new machine? We have a tool you can use which outputs each TLS status (as my comment above showed): https://gist.github.com/zivkan/5291f507c8c5724d41a18357b7afcd30 When I ran this on the VM yesterday, the Tls12 status was "worked", and that's exactly what it needs to do to work with nuget.org.

You can also check this in the Windows settings if you prefer, I believe it's under "internet options" in control panel.

vdanche commented 9 months ago

@donnie-msft It did repro on a new win10 VM not repro on yesterday's VM. seem like transient network issue as your comment above. We downloaded tool zip as below. Could you share the tool using details? Thank in advanced. image

We did not find TLS status in internet option. image

donnie-msft commented 9 months ago

@vdanche if you download the files, which you may notice is a.NET project, you can run 'dotnet build' in that project directory, and it should generate a .exe under bin/Debug/net6.0/ subdirectory. If you don't have that version of .NET installed, it will error, so you can just change the Target Framework inside the csproj to net8.0, and try building again.

Once you build, simply run this exe from command line and it will output the status as I showed above.

vdanche commented 9 months ago

@donnie-msft we still repro a new win10 VM, details as below: 1.install net8.0.200 preview sdk. 2.Run "restore.cmd" under format project and some package failed to download image 3.dotnet build the tool for checking TLS and run the .exe under bin/Debug/net8.0, we can find that TLS12 worked image

Note: this issue only happens when using sdk for the first time, after the step2 is done, we delete the file under C:\Users\v-danche image and unzip a new format project and then run "restore.cmd", this issue also repro again.

But It's interesting that if the step3 for checking TLS status is done, we delete the file under C:\Users\v-danche and unzip a new format project and then run "restore.cmd", this issue will not repro. image

vdanche commented 9 months ago

@donnie-msft We have created a new VM again and it will repro the issue if everything goes on well. please let us know if you need VM. Steps: 1.After login with the account, download and unzip format format.zip 2.Run "Restore.cmd" in the format directory.

Note: It usually happens when using the SDK for the first time only happens on win10(Windows-10-Enterprise-22H2), not meet on win11(zn_release-enterprise_en-us_vl)