Fatal error migrating from 2.6 to 3.2.16

The following exception is seen in the OctopusMigrator log attached:

2016-01-13 12:40:37.8586 1 FATAL Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Octopus.Migrator.DocumentImporters.ReleaseImporter.GetExistingItem(ImportedDocument document, ImportContext context, Identity identity) in Y:\work\refs\tags\3.2.16\source\Octopus.Migrator\DocumentImporters\ReleaseImporter.cs:line 53
at Octopus.Migrator.DocumentImporters.ConventionBasedImporter2.Import(ImportedDocument document, ImportContext context) in Y:\work\refs\tags\3.2.16\source\Octopus.Migrator\DocumentImporters\ConventionBasedImporter.cs:line 96 at Octopus.Migrator.ImportProcess.ImportController.ConvertDocuments(ImportContext context) in Y:\work\refs\tags\3.2.16\source\Octopus.Migrator\ImportProcess\ImportController.cs:line 367 at Octopus.Migrator.ImportProcess.ImportController.Import(IImportedDocumentSource backup) in Y:\work\refs\tags\3.2.16\source\Octopus.Migrator\ImportProcess\ImportController.cs:line 102 at Octopus.Migrator.Commands.MigrateCommand.Start() in Y:\work\refs\tags\3.2.16\source\Octopus.Migrator\Commands\MigrateCommand.cs:line 84 at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in Y:\work\refs\tags\3.2.16\source\Octopus.Shared\Startup\AbstractCommand.cs:line 57 at Octopus.Shared.Startup.ConsoleHost.Run(Action1 start, Action shutdown) in Y:\work\refs\tags\3.2.16\source\Octopus.Shared\Startup\ConsoleHost.cs:line 72
at Octopus.Shared.Startup.OctopusProgram.Run() in Y:\work\refs\tags\3.2.16\source\Octopus.Shared\Startup\OctopusProgram.cs:line 87

OctopusMigrator.2016-01-13_09_22_18.6367.zip (2 MB)

Hi Rmardeni,
Thanks for bringing this issue to our attention. Looking through the code it does indeed look in some rare cases there is a bug where the release is being skipped.
I can see in the logs just before it the line Warning: Skipping Release releases-4125 because its dependencies were not satisfied. Missing snapshots. In this case it looks like the migrator is still trying to import it. We will have a fix in as part of another migrator bugfix, probably to go out in 3.2.18 either this week or early next. In the meantime you should be able to get around this issue by either including the dependencies that the log file indicates are not available, or removing the release item from the backup. The migrator should then skip over the release and continue.
If you don’t want to wait until we have a fix available feel free to give this workaround a try and let me know how it goes.
Cheers,
Robert

Unfortunately I cannot wait for that release to happen as this a well overdue migration we are trying to do. I will try the workaround you are suggesting to see if that lets me complete the task at hand. I will update this once I have the results.

I want to report that this can be closed as most of the issues were resolved in release 3.2.19 and cleaning up in our side orphan documents.

Hi,
Thanks for letting us know how things went for you. Im glad that your import process has been sorted.
Cheers,
Robert