dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.7k stars 1.06k forks source link

NullRef installing WebAssembly AOT workload on Linux #17865

Closed danroth27 closed 3 years ago

danroth27 commented 3 years ago
Writing workload pack installation record for Microsoft.NET.Runtime.Emscripten.Node version 6.0.0-preview.4.21220.1...
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.GetPackInstallRecordPath(PackInfo packInfo, SdkFeatureBand featureBand) in dotnet.dll:token 0x60001c5+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.DeletePackInstallationRecord(PackInfo packInfo, SdkFeatureBand featureBand) in dotnet.dll:token 0x60001c7+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.RollBackWorkloadPackInstall(PackInfo packInfo, SdkFeatureBand sdkFeatureBand) in dotnet.dll:token 0x60001bd+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.<>c__DisplayClass14_1.<InstallWorkloadsWithInstallRecord>b__3() in dotnet.dll:token 0x6000b20+0x15
   at Microsoft.DotNet.Cli.TransactionalAction.EnlistmentNotification.Rollback(Enlistment enlistment) in dotnet.dll:token 0x6000ced+0x8
   at System.Transactions.VolatileEnlistmentAborting.EnterState(InternalEnlistment enlistment) in System.Transactions.Local.dll:token 0x6000404+0x0
   at System.Transactions.VolatileEnlistmentActive.InternalAborted(InternalEnlistment enlistment) in System.Transactions.Local.dll:token 0x60003e9+0x0
   at System.Transactions.TransactionStateAborted.EnterState(InternalTransaction tx) in System.Transactions.Local.dll:token 0x6000259+0x4c
   at System.Transactions.TransactionStateActive.Rollback(InternalTransaction tx, Exception e) in System.Transactions.Local.dll:token 0x6000224+0x8
   at System.Transactions.Transaction.Rollback() in System.Transactions.Local.dll:token 0x600010b+0x4b
   at System.Transactions.TransactionScope.InternalDispose() in System.Transactions.Local.dll:token 0x600019c+0x95
   at System.Transactions.TransactionScope.Dispose() in System.Transactions.Local.dll:token 0x600019b+0x34b
   at Microsoft.DotNet.Cli.TransactionalAction.Run[T](Func`1 action, Action commit, Action rollback) in dotnet.dll:token 0x6000922+0x47
   at Microsoft.DotNet.Cli.TransactionalAction.Run(Action action, Action commit, Action rollback) in dotnet.dll:token 0x6000923+0x19
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.InstallWorkloadsWithInstallRecord(IEnumerable`1 workloadIds, SdkFeatureBand sdkFeatureBand) in dotnet.dll:token 0x60001cf+0xb5
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.InstallWorkloads(IEnumerable`1 workloadIds, Boolean skipManifestUpdate) in dotnet.dll:token 0x60001ce+0x58
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.Execute() in dotnet.dll:token 0x60001cb+0x216
   at Microsoft.DotNet.Cli.DotNetTopLevelCommandBase.RunCommand(String[] args) in dotnet.dll:token 0x60008af+0x5e
   at Microsoft.DotNet.Workloads.Workload.WorkloadCommand.Run(String[] args) in dotnet.dll:token 0x6000145+0x6
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient) in dotnet.dll:token 0x6000918+0x2e8
   at Microsoft.DotNet.Cli.Program.Main(String[] args) in dotnet.dll:token 0x6000916+0x6f
dotnet-issue-labeler[bot] commented 3 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

anthonychu commented 3 years ago

Repro steps:

docker run --rm -it mcr.microsoft.com/dotnet/sdk:6.0.100-preview.4 bash
root@f0a70414298b:/# dotnet workload install microsoft-net-sdk-blazorwebassembly-aot

Installing pack Microsoft.NET.Runtime.MonoAOTCompiler.Task version 6.0.0-preview.4.21253.7...
[NuGet Manager] [Info]   GET https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.monoaotcompiler.task/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.monoaotcompiler.task/index.json 237ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.monoaotcompiler.task/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.monoaotcompiler.task/index.json 223ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.monoaotcompiler.task/6.0.0-preview.4.21253.7/microsoft.net.runtime.monoaotcompiler.task.6.0.0-preview.4.21253.7.nupkg
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.monoaotcompiler.task/6.0.0-preview.4.21253.7/microsoft.net.runtime.monoaotcompiler.task.6.0.0-preview.4.21253.7.nupkg 26ms
Writing workload pack installation record for Microsoft.NET.Runtime.MonoAOTCompiler.Task version 6.0.0-preview.4.21253.7...
Installing pack Microsoft.NET.Runtime.WebAssembly.Sdk version 6.0.0-preview.4.21253.7...
[NuGet Manager] [Info]   GET https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.webassembly.sdk/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.webassembly.sdk/index.json 304ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.webassembly.sdk/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.webassembly.sdk/index.json 306ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.webassembly.sdk/6.0.0-preview.4.21253.7/microsoft.net.runtime.webassembly.sdk.6.0.0-preview.4.21253.7.nupkg
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.webassembly.sdk/6.0.0-preview.4.21253.7/microsoft.net.runtime.webassembly.sdk.6.0.0-preview.4.21253.7.nupkg 27ms
Writing workload pack installation record for Microsoft.NET.Runtime.WebAssembly.Sdk version 6.0.0-preview.4.21253.7...
Installing pack Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm version 6.0.0-preview.4.21253.7...
[NuGet Manager] [Info]   GET https://api.nuget.org/v3/registration5-gz-semver2/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3/registration5-gz-semver2/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/index.json 312ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/index.json 284ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/6.0.0-preview.4.21253.7/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm.6.0.0-preview.4.21253.7.nupkg
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/6.0.0-preview.4.21253.7/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm.6.0.0-preview.4.21253.7.nupkg 23ms
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm version 6.0.0-preview.4.21253.7...
Installing pack Microsoft.NET.Runtime.Emscripten.Node version 6.0.0-preview.4.21220.1...
[NuGet Manager] [Info]   GET https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/index.json 143ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/index.json 311ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/6.0.0-preview.4.21220.1/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64.6.0.0-preview.4.21220.1.nupkg
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/6.0.0-preview.4.21220.1/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64.6.0.0-preview.4.21220.1.nupkg 286ms
Writing workload pack installation record for Microsoft.NET.Runtime.Emscripten.Node version 6.0.0-preview.4.21220.1...
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.GetPackInstallRecordPath(PackInfo packInfo, SdkFeatureBand featureBand) in dotnet.dll:token 0x60001c5+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.DeletePackInstallationRecord(PackInfo packInfo, SdkFeatureBand featureBand) in dotnet.dll:token 0x60001c7+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.RollBackWorkloadPackInstall(PackInfo packInfo, SdkFeatureBand sdkFeatureBand) in dotnet.dll:token 0x60001bd+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.<>c__DisplayClass14_1.<InstallWorkloadsWithInstallRecord>b__3() in dotnet.dll:token 0x6000b20+0x15
   at Microsoft.DotNet.Cli.TransactionalAction.EnlistmentNotification.Rollback(Enlistment enlistment) in dotnet.dll:token 0x6000ced+0x8
   at System.Transactions.VolatileEnlistmentAborting.EnterState(InternalEnlistment enlistment) in System.Transactions.Local.dll:token 0x6000404+0x0
   at System.Transactions.VolatileEnlistmentActive.InternalAborted(InternalEnlistment enlistment) in System.Transactions.Local.dll:token 0x60003e9+0x0
   at System.Transactions.TransactionStateAborted.EnterState(InternalTransaction tx) in System.Transactions.Local.dll:token 0x6000259+0x4c
   at System.Transactions.TransactionStateActive.Rollback(InternalTransaction tx, Exception e) in System.Transactions.Local.dll:token 0x6000224+0x8
   at System.Transactions.Transaction.Rollback() in System.Transactions.Local.dll:token 0x600010b+0x4b
   at System.Transactions.TransactionScope.InternalDispose() in System.Transactions.Local.dll:token 0x600019c+0x95
   at System.Transactions.TransactionScope.Dispose() in System.Transactions.Local.dll:token 0x600019b+0x34b
   at Microsoft.DotNet.Cli.TransactionalAction.Run[T](Func`1 action, Action commit, Action rollback) in dotnet.dll:token 0x6000922+0x47
   at Microsoft.DotNet.Cli.TransactionalAction.Run(Action action, Action commit, Action rollback) in dotnet.dll:token 0x6000923+0x19
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.InstallWorkloadsWithInstallRecord(IEnumerable`1 workloadIds, SdkFeatureBand sdkFeatureBand) in dotnet.dll:token 0x60001cf+0xb5
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.InstallWorkloads(IEnumerable`1 workloadIds, Boolean skipManifestUpdate) in dotnet.dll:token 0x60001ce+0x58
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.Execute() in dotnet.dll:token 0x60001cb+0x216
   at Microsoft.DotNet.Cli.DotNetTopLevelCommandBase.RunCommand(String[] args) in dotnet.dll:token 0x60008af+0x5e
   at Microsoft.DotNet.Workloads.Workload.WorkloadCommand.Run(String[] args) in dotnet.dll:token 0x6000145+0x6
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient) in dotnet.dll:token 0x6000918+0x2e8
   at Microsoft.DotNet.Cli.Program.Main(String[] args) in dotnet.dll:token 0x6000916+0x6f
srpeirce commented 3 years ago

We have the exact same problem trying to install in an Azure Devops pipeline. Any help would be most appreciated.

Bigtalljosh commented 3 years ago

We have the exact same problem trying to install in an Azure Devops pipeline. Any help would be most appreciated.

Same here :D

TanayParikh commented 3 years ago

Confirmed repro on MacOS as well:

$ docker run --rm -it mcr.microsoft.com/dotnet/sdk:6.0.100-preview.4 bash
Unable to find image 'mcr.microsoft.com/dotnet/sdk:6.0.100-preview.4' locally
6.0.100-preview.4: Pulling from dotnet/sdk
f219f9fec81c: Pull complete
87ab5fd557d8: Pull complete
1b3dbf310c8a: Pull complete
dfd52031c6e4: Pull complete
ae60fb5becb3: Pull complete
5f844c77a223: Pull complete
af158a91a1bb: Pull complete
c6ae4f696086: Pull complete
Digest: sha256:bd327e7ab00fd6777d277730bf39a54f6fd5e6669a92b241575b19dfc628b4d6
Status: Downloaded newer image for mcr.microsoft.com/dotnet/sdk:6.0.100-preview.4
root@0978b21f97fe:/# dotnet workload install microsoft-net-sdk-blazorwebassembly-aot
Installing pack Microsoft.NET.Runtime.MonoAOTCompiler.Task version 6.0.0-preview.4.21253.7...
[NuGet Manager] [Info]   GET https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.monoaotcompiler.task/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.monoaotcompiler.task/index.json 66ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.monoaotcompiler.task/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.monoaotcompiler.task/index.json 62ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.monoaotcompiler.task/6.0.0-preview.4.21253.7/microsoft.net.runtime.monoaotcompiler.task.6.0.0-preview.4.21253.7.nupkg
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.monoaotcompiler.task/6.0.0-preview.4.21253.7/microsoft.net.runtime.monoaotcompiler.task.6.0.0-preview.4.21253.7.nupkg 220ms
Writing workload pack installation record for Microsoft.NET.Runtime.MonoAOTCompiler.Task version 6.0.0-preview.4.21253.7...
Installing pack Microsoft.NET.Runtime.WebAssembly.Sdk version 6.0.0-preview.4.21253.7...
[NuGet Manager] [Info]   GET https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.webassembly.sdk/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.webassembly.sdk/index.json 229ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.webassembly.sdk/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.webassembly.sdk/index.json 248ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.webassembly.sdk/6.0.0-preview.4.21253.7/microsoft.net.runtime.webassembly.sdk.6.0.0-preview.4.21253.7.nupkg
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.webassembly.sdk/6.0.0-preview.4.21253.7/microsoft.net.runtime.webassembly.sdk.6.0.0-preview.4.21253.7.nupkg 335ms
Writing workload pack installation record for Microsoft.NET.Runtime.WebAssembly.Sdk version 6.0.0-preview.4.21253.7...
Installing pack Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm version 6.0.0-preview.4.21253.7...
[NuGet Manager] [Info]   GET https://api.nuget.org/v3/registration5-gz-semver2/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3/registration5-gz-semver2/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/index.json 95ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/index.json 259ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/6.0.0-preview.4.21253.7/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm.6.0.0-preview.4.21253.7.nupkg
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm/6.0.0-preview.4.21253.7/microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm.6.0.0-preview.4.21253.7.nupkg 10ms
Writing workload pack installation record for Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm version 6.0.0-preview.4.21253.7...
Installing pack Microsoft.NET.Runtime.Emscripten.Node version 6.0.0-preview.4.21220.1...
[NuGet Manager] [Info]   GET https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3/registration5-gz-semver2/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/index.json 242ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/index.json
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/index.json 256ms
[NuGet Manager] [Info]   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/6.0.0-preview.4.21220.1/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64.6.0.0-preview.4.21220.1.nupkg
[NuGet Manager] [Info]   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64/6.0.0-preview.4.21220.1/microsoft.net.runtime.emscripten.2.0.12.node.linux-x64.6.0.0-preview.4.21220.1.nupkg 7ms
Writing workload pack installation record for Microsoft.NET.Runtime.Emscripten.Node version 6.0.0-preview.4.21220.1...
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.GetPackInstallRecordPath(PackInfo packInfo, SdkFeatureBand featureBand) in dotnet.dll:token 0x60001c5+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.DeletePackInstallationRecord(PackInfo packInfo, SdkFeatureBand featureBand) in dotnet.dll:token 0x60001c7+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.NetSdkManagedInstaller.RollBackWorkloadPackInstall(PackInfo packInfo, SdkFeatureBand sdkFeatureBand) in dotnet.dll:token 0x60001bd+0x0
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.<>c__DisplayClass14_1.<InstallWorkloadsWithInstallRecord>b__3() in dotnet.dll:token 0x6000b20+0x15
   at Microsoft.DotNet.Cli.TransactionalAction.EnlistmentNotification.Rollback(Enlistment enlistment) in dotnet.dll:token 0x6000ced+0x8
   at System.Transactions.VolatileEnlistmentAborting.EnterState(InternalEnlistment enlistment) in System.Transactions.Local.dll:token 0x6000404+0x0
   at System.Transactions.VolatileEnlistmentActive.InternalAborted(InternalEnlistment enlistment) in System.Transactions.Local.dll:token 0x60003e9+0x0
   at System.Transactions.TransactionStateAborted.EnterState(InternalTransaction tx) in System.Transactions.Local.dll:token 0x6000259+0x4c
   at System.Transactions.TransactionStateActive.Rollback(InternalTransaction tx, Exception e) in System.Transactions.Local.dll:token 0x6000224+0x8
   at System.Transactions.Transaction.Rollback() in System.Transactions.Local.dll:token 0x600010b+0x4b
   at System.Transactions.TransactionScope.InternalDispose() in System.Transactions.Local.dll:token 0x600019c+0x95
   at System.Transactions.TransactionScope.Dispose() in System.Transactions.Local.dll:token 0x600019b+0x34b
   at Microsoft.DotNet.Cli.TransactionalAction.Run[T](Func`1 action, Action commit, Action rollback) in dotnet.dll:token 0x6000922+0x47
   at Microsoft.DotNet.Cli.TransactionalAction.Run(Action action, Action commit, Action rollback) in dotnet.dll:token 0x6000923+0x19
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.InstallWorkloadsWithInstallRecord(IEnumerable`1 workloadIds, SdkFeatureBand sdkFeatureBand) in dotnet.dll:token 0x60001cf+0xb5
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.InstallWorkloads(IEnumerable`1 workloadIds, Boolean skipManifestUpdate) in dotnet.dll:token 0x60001ce+0x58
   at Microsoft.DotNet.Workloads.Workload.Install.WorkloadInstallCommand.Execute() in dotnet.dll:token 0x60001cb+0x216
   at Microsoft.DotNet.Cli.DotNetTopLevelCommandBase.RunCommand(String[] args) in dotnet.dll:token 0x60008af+0x5e
   at Microsoft.DotNet.Workloads.Workload.WorkloadCommand.Run(String[] args) in dotnet.dll:token 0x6000145+0x6
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient) in dotnet.dll:token 0x6000918+0x2e8
   at Microsoft.DotNet.Cli.Program.Main(String[] args) in dotnet.dll:token 0x6000916+0x6f
sfoslund commented 3 years ago

I'm still investigating the original error, but I have confirmed that this issue does not repro with our preview 5 builds.

sfoslund commented 3 years ago

I've found the issue, it's related to https://github.com/dotnet/sdk/issues/17790. Basically, the install fails because the blazor workload does not define a linux package alias for the Microsoft.NET.Runtime.Emscripten.Python pack in their manifest file. As a result, the installation is failing and while we try to roll back we get another failure, which results in this confusing message. All of these issues have been fixed in preview 5: Issue causing the install failure/ roll back failure (no linux alias specified): https://github.com/dotnet/sdk/pull/17794 Logging improvement, for clearer error message: https://github.com/dotnet/sdk/pull/17233

For now with the buggy SDK version, the offending sections of the blazor manifest (sdk-manifests\6.0.100\Microsoft.NET.Workload.BlazorWebAssembly\WorkloadManifest.json) are:

    "Microsoft.NET.Runtime.Emscripten.Python" : {
      "kind": "Sdk",
      "version": "6.0.0-preview.4.21220.1",
      "alias-to": {
        "win-x86": "Microsoft.NET.Runtime.Emscripten.2.0.12.Python.win-x86",
        "win-x64": "Microsoft.NET.Runtime.Emscripten.2.0.12.Python.win-x64",
        "osx-x64": "Microsoft.NET.Runtime.Emscripten.2.0.12.Python.osx-x64"
      }
    },

and

        "Microsoft.NET.Runtime.Emscripten.Python",

So this issue can be worked around on linux by just removing these sections from the manifest file.

marcpopMSFT commented 3 years ago

This should be fixed in preview 5.