dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.28k stars 1.76k forks source link

[Bug] Installing MAUI workload fails #3021

Closed Stamo-Gochev closed 3 years ago

Stamo-Gochev commented 3 years ago

Description

I am getting an error when following the installation instructions at: https://github.com/dotnet/maui/wiki/Installing-.NET-6#net-maui-workload

Workload installation failed: One or more errors occurred. (microsoft.netcore.app.runtime.mono.android-arm.msi.x64::6.0.0-rc.2.21480.5 is not found in NuGet feeds https://aka.ms/dotnet6/nuget/index.json".)

After running the clean script: https://github.com/Redth/dotnet-maui-check/blob/main/Clean-Old-DotNet6-Previews.ps1

another error is thrown and there isn't a suggestion how to workaround it.

Steps to Reproduce

  1. Go to https://github.com/dotnet/maui/wiki/Installing-.NET-6#net-maui-workload
  2. Run the following command taken from the link above (the same error is thrown for other targets like preview 10 or the main branch)

    dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/preview.9.json --source https://aka.ms/dotnet6/nuget/index.json

Expected Behavior

The installation is successful

Actual Behavior

Workload installation failed: Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory.

Full log ``` Updated advertising manifest microsoft.net.sdk.maccatalyst. Updated advertising manifest microsoft.net.sdk.macos. Failed to update the advertising manifest microsoft.net.workload.emscripten: Failed to validate package signing. Verifying Microsoft.NET.Workload.Emscripten.Manifest-6.0.100.6.0.0-rtm.21514.1 error: NU3004: The package is not signed. Package signature validation failed. . Updated advertising manifest microsoft.net.sdk.tvos. Updated advertising manifest microsoft.net.sdk.maui. Updated advertising manifest microsoft.net.sdk.android. Failed to update the advertising manifest microsoft.net.workload.mono.toolchain: Failed to validate package signing. Verifying Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100.6.0.0-rtm.21518.12 error: NU3004: The package is not signed. Package signature validation failed. . Updated advertising manifest microsoft.net.sdk.ios. Installing workload manifest microsoft.net.sdk.android version 31.0.101-preview.10.46… Installing workload manifest microsoft.net.sdk.ios version 15.0.101-preview.10.175… Installing workload manifest microsoft.net.sdk.maccatalyst version 15.0.101-preview.10.175… Installing workload manifest microsoft.net.sdk.macos version 12.0.101-preview.10.175… Installing workload manifest microsoft.net.sdk.maui version 6.0.101-preview.10.1917… Installing workload manifest microsoft.net.sdk.tvos version 15.0.101-preview.10.175… Installing pack Microsoft.Maui.Core.Ref.android version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.Maui.Core.Ref.android version 6.0.101-preview.10.1917... Installing pack Microsoft.Maui.Core.Runtime.android version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.Maui.Core.Runtime.android version 6.0.101-preview.10.1917... Installing pack Microsoft.Maui.Controls.Ref.android version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.Maui.Controls.Ref.android version 6.0.101-preview.10.1917... Installing pack Microsoft.Maui.Controls.Runtime.android version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.Maui.Controls.Runtime.android version 6.0.101-preview.10.1917... Installing pack Microsoft.Maui.Essentials.Ref.android version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.Maui.Essentials.Ref.android version 6.0.101-preview.10.1917... Installing pack Microsoft.Maui.Essentials.Runtime.android version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.Maui.Essentials.Runtime.android version 6.0.101-preview.10.1917... Installing pack Microsoft.AspNetCore.Components.WebView.Maui version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.AspNetCore.Components.WebView.Maui version 6.0.101-preview.10.1917... Installing pack Microsoft.Maui.Dependencies version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.Maui.Dependencies version 6.0.101-preview.10.1917... Installing pack Microsoft.Maui.Controls.Build.Tasks version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.Maui.Controls.Build.Tasks version 6.0.101-preview.10.1917... Installing pack Microsoft.Maui.Sdk version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.Maui.Sdk version 6.0.101-preview.10.1917... Installing pack Microsoft.Maui.Extensions version 6.0.101-preview.10.1917... Writing workload pack installation record for Microsoft.Maui.Extensions version 6.0.101-preview.10.1917... Installing pack Microsoft.Maui.Resizetizer.Sdk version 6.0.101-preview.10.1917... Workload installation failed. Rolling back installed packs... Installing workload manifest microsoft.net.sdk.android version 31.0.101-preview.9.16… Installation rollback failed: Failed to install manifest microsoft.net.sdk.android version 31.0.101-preview.9.16: The transaction has aborted.. Rolling back pack Microsoft.Maui.Core.Ref.android installation... Uninstalling workload pack Microsoft.Maui.Core.Ref.android version 6.0.101-preview.10.1917… Rolling back pack Microsoft.Maui.Core.Runtime.android installation... Uninstalling workload pack Microsoft.Maui.Core.Runtime.android version 6.0.101-preview.10.1917… Rolling back pack Microsoft.Maui.Controls.Ref.android installation... Uninstalling workload pack Microsoft.Maui.Controls.Ref.android version 6.0.101-preview.10.1917… Rolling back pack Microsoft.Maui.Controls.Runtime.android installation... Uninstalling workload pack Microsoft.Maui.Controls.Runtime.android version 6.0.101-preview.10.1917… Rolling back pack Microsoft.Maui.Essentials.Ref.android installation... Uninstalling workload pack Microsoft.Maui.Essentials.Ref.android version 6.0.101-preview.10.1917… Rolling back pack Microsoft.Maui.Essentials.Runtime.android installation... Uninstalling workload pack Microsoft.Maui.Essentials.Runtime.android version 6.0.101-preview.10.1917… Rolling back pack Microsoft.AspNetCore.Components.WebView.Maui installation... Uninstalling workload pack Microsoft.AspNetCore.Components.WebView.Maui version 6.0.101-preview.10.1917… Rolling back pack Microsoft.Maui.Dependencies installation... Uninstalling workload pack Microsoft.Maui.Dependencies version 6.0.101-preview.10.1917… Rolling back pack Microsoft.Maui.Controls.Build.Tasks installation... Uninstalling workload pack Microsoft.Maui.Controls.Build.Tasks version 6.0.101-preview.10.1917… Rolling back pack Microsoft.Maui.Sdk installation... Uninstalling workload pack Microsoft.Maui.Sdk version 6.0.101-preview.10.1917… Rolling back pack Microsoft.Maui.Extensions installation... Uninstalling workload pack Microsoft.Maui.Extensions version 6.0.101-preview.10.1917… Rolling back pack Microsoft.Maui.Resizetizer.Sdk installation... Workload installation failed: Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory. ```

Basic Information

3.1.403 [C:\Program Files\dotnet\sdk]
5.0.100 [C:\Program Files (x86)\dotnet\sdk]
5.0.101 [C:\Program Files\dotnet\sdk]
5.0.301 [C:\Program Files\dotnet\sdk]
5.0.400-preview.21277.10 [C:\Program Files\dotnet\sdk]
6.0.100-rc.2.21505.57 [C:\Program Files\dotnet\sdk]
Stamo-Gochev commented 3 years ago

Seems to be caused by an incorrect nuget feed configuration on my side. Updating the correct maui/dotnet feeds and reinstalling fixes the issue.

CalaxDev commented 3 years ago

How exactly did you resolve your issue?

I've already uninstalled everything (VS, dotnet), ran the cleanup script and reinstalled everything, yet I'm still getting errors. Starting to suspect it's the NuGet Feed as well, but I really only have a single entry to the default feed in my config.

Could you give me a little hint on what you did to resolve your specific issue?

Thank you!

Stamo-Gochev commented 3 years ago

I followed all the instructions from https://github.com/dotnet/maui/wiki/Installing-.NET-6 and it worked as expected. If you are still having issues, you can log a separate issue, so that the MAUI team can provide some suggestions.

Redth commented 2 years ago

Unfortunately the answer as of now is basically try again, this appears to be a transient network error of some type.

You can track discussion/progress here, as this is a dotnet/sdk level bug: https://github.com/dotnet/sdk/issues/20849