Error while upgrading Calamari (3.7.26)

After upgrading my Octopus Deploy server from 3.4.14 to 3.11.15, I’ve decided to manually upgrade also my Calamari to 3.7.26. The Tentacle versions were still on 3.4.14 and on the upgrade process all of my agents had the same error:

Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Octopus.Worker.Tentacles.TentacleUpgradeMediator.WaitForExitCode(String installId) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Worker\Tentacles\TentacleUpgradeMediator.cs:line 111
at Octopus.Worker.Tentacles.TentacleUpgradeMediator.PerformUpgrade(TargetManifest targetManifest) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Worker\Tentacles\TentacleUpgradeMediator.cs:line 54
Octopus.Server version 3.11.15 (3.11.15+Branch.master.Sha.dfd5769932978a1f1b86efcfb1a0d030bb311a4b)

I have the same experience. It happens to one in five of my agent upgrades. All nodes are near identical running 2012 R2. Going from 3.3.6 to 3.11.15

This server does not have version 3.7.26 of the Calamari package. It will be pushed automatically.
Calamari upgrade successful
Running Tentacle version 3.3.6
Beginning upgrade
Waiting for the upgrade to complete
Tentacle has stopped. Waiting for it to start...
Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Octopus.Worker.Tentacles.TentacleUpgradeMediator.WaitForExitCode(String installId) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Worker\Tentacles\TentacleUpgradeMediator.cs:line 111
   at Octopus.Worker.Tentacles.TentacleUpgradeMediator.PerformUpgrade(TargetManifest targetManifest) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Worker\Tentacles\TentacleUpgradeMediator.cs:line 54
Octopus.Server version 3.11.15 (3.11.15+Branch.master.Sha.dfd5769932978a1f1b86efcfb1a0d030bb311a4b)
Finishing upgrade

Hi Pedro, William,

Thank you for the reports. I have opened an issue and we will be shipping a fix today.

Regards,

Robert W