Upgrade to 3.3.10 failed - sql script error

I cannot upgrade my Octopus version from 3.3.6. I have tried version 3.3.8 - 3.3.10 when the upgrade fails I revert to 3.3.6.

The following is the error in my windows event viewer:

2016-04-26 08:16:20.0208 7 FATAL Unhandled AppDomain exception occurred: Database upgrade failed: The given key was not present in the dictionary.
Database upgrade logs:
Beginning database upgrade
Fetching list of already executed scripts.
Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0038ConvertStepActionChannelRuleLink.cs’
Upgrade failed due to an unexpected exception:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Octopus.Core.UpgradeScripts.Script0038ConvertStepActionChannelRuleLink.FixupChannel(IReadOnlyList1 record, Func1 commandFactory, Dictionary2 allProjectsMap) in Y:\work\refs\tags\3.3.10\source\Octopus.Core\UpgradeScripts\Script0038 - Convert StepAction-ChannelRule link to use Id not Name.cs:line 56
at Octopus.Core.UpgradeScripts.Script0038ConvertStepActionChannelRuleLink.ProvideScript(Func1 commandFactory) in Y:\work\refs\tags\3.3.10\source\Octopus.Core\UpgradeScripts\Script0038 - Convert StepAction-ChannelRule link to use Id not Name.cs:line 25 at DbUp.ScriptProviders.EmbeddedScriptAndCodeProvider.<>c__DisplayClass4.<>c__DisplayClass6.<>c__DisplayClass8.<ScriptsFromScriptClasses>b__3() at DbUp.Engine.LazySqlScript.get_Contents() at DbUp.Support.SqlServer.SqlScriptExecutor.Execute(SqlScript script, IDictionary2 variables)
at DbUp.Engine.UpgradeEngine.PerformUpgrade()

System.Exception: Database upgrade failed: The given key was not present in the dictionary.
Database upgrade logs:
Beginning database upgrade
Fetching list of already executed scripts.
Executing SQL Server script 'Octopus.Core.UpgradeScripts.Script0038ConvertStepActionChannelRuleLink.cs’
Upgrade failed due to an unexpected exception:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Octopus.Core.UpgradeScripts.Script0038ConvertStepActionChannelRuleLink.FixupChannel(IReadOnlyList1 record, Func1 commandFactory, Dictionary2 allProjectsMap) in Y:\work\refs\tags\3.3.10\source\Octopus.Core\UpgradeScripts\Script0038 - Convert StepAction-ChannelRule link to use Id not Name.cs:line 56
at Octopus.Core.UpgradeScripts.Script0038ConvertStepActionChannelRuleLink.ProvideScript(Func1 commandFactory) in Y:\work\refs\tags\3.3.10\source\Octopus.Core\UpgradeScripts\Script0038 - Convert StepAction-ChannelRule link to use Id not Name.cs:line 25 at DbUp.ScriptProviders.EmbeddedScriptAndCodeProvider.<>c__DisplayClass4.<>c__DisplayClass6.<>c__DisplayClass8.<ScriptsFromScriptClasses>b__3() at DbUp.Engine.LazySqlScript.get_Contents() at DbUp.Support.SqlServer.SqlScriptExecutor.Execute(SqlScript script, IDictionary2 variables)
at DbUp.Engine.UpgradeEngine.PerformUpgrade()
—> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Octopus.Core.UpgradeScripts.Script0038ConvertStepActionChannelRuleLink.FixupChannel(IReadOnlyList1 record, Func1 commandFactory, Dictionary2 allProjectsMap) in Y:\work\refs\tags\3.3.10\source\Octopus.Core\UpgradeScripts\Script0038 - Convert StepAction-ChannelRule link to use Id not Name.cs:line 56
at Octopus.Core.UpgradeScripts.Script0038ConvertStepActionChannelRuleLink.ProvideScript(Func1 commandFactory) in Y:\work\refs\tags\3.3.10\source\Octopus.Core\UpgradeScripts\Script0038 - Convert StepAction-ChannelRule link to use Id not Name.cs:line 25 at DbUp.ScriptProviders.EmbeddedScriptAndCodeProvider.<>c__DisplayClass4.<>c__DisplayClass6.<>c__DisplayClass8.<ScriptsFromScriptClasses>b__3() at DbUp.Engine.LazySqlScript.get_Contents() at DbUp.Support.SqlServer.SqlScriptExecutor.Execute(SqlScript script, IDictionary2 variables)
at DbUp.Engine.UpgradeEngine.PerformUpgrade()
— End of inner exception stack trace —
at Octopus.Core.Initialization.DatabaseUpgrader.Upgrade(IRelationalStore store) in Y:\work\refs\tags\3.3.10\source\Octopus.Core\Initialization\DatabaseUpgrader.cs:line 40
at Octopus.Core.Initialization.BuiltIn.DatabaseUpgradeInitializer.Initialize(IRelationalStore store) in Y:\work\refs\tags\3.3.10\source\Octopus.Core\Initialization\BuiltIn\DatabaseUpgradeInitializer.cs:line 19
at Octopus.Core.Initialization.StoreInitializer.Initialize() in Y:\work\refs\tags\3.3.10\source\Octopus.Core\Initialization\StoreInitializer.cs:line 22
at Octopus.Server.OctopusServerEngine.Start() in Y:\work\refs\tags\3.3.10\source\Octopus.Server\OctopusServerEngine.cs:line 49
at Octopus.Server.Commands.RunCommand.Start() in Y:\work\refs\tags\3.3.10\source\Octopus.Server\Commands\RunCommand.cs:line 37
at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Startup\AbstractCommand.cs:line 58
at Octopus.Shared.Startup.OctopusProgram.Start(ICommandRuntime commandRuntime) in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Startup\OctopusProgram.cs:line 210
at Octopus.Shared.Startup.WindowsServiceHost.<>c__DisplayClass1_0.b__0() in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Startup\WindowsServiceHost.cs:line 19
at Octopus.Shared.Startup.WindowsServiceAdapter.RunService() in Y:\work\refs\tags\3.3.10\source\Octopus.Shared\Startup\WindowsServiceAdapter.cs:line 59
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Hi,

Thanks for getting in touch.

We’ve raised this as a priority issue for our dev team. You can track the progress on Github here and we hope to have a fix for you asap.

Sorry for the inconvenience.

Cheers
Mark