question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullRef installing WebAssembly AOT workload on Linux

See original GitHub issue
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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
marcpopMSFTcommented, Jun 2, 2021

This should be fixed in preview 5.

1reaction
sfoslundcommented, May 26, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet workload install command - .NET CLI
The 'dotnet workload install' command installs optional workloads. ... NET MAUI and Blazor WebAssembly AOT. Use dotnet workload search to ...
Read more >
Bug #2018308 “'dotnet workload install' command doesn't ...
'dotnet workload install' command doesn't work on LXC container when login as ubuntu user.
Read more >
c# - .Net7 issue with AOT compilation: "Workload ID wasm- ...
After entering> dotnet workload install wasm-tools I get "Workload ID wasm-tools is not recognized." error message. I can't seem to find what ...
Read more >
C++ IntelliSense doesn't work correctly by default (gives ...
Open the attached file. Bug: It gives lots of errors about undefined types and functions which should be compiler defined. The original bug ......
Read more >
Untitled
NET projects with native AOT. On Windows, install Visual Studio 2022, including Desktop development with C++ workload with all default components. On Linux...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found