Import Project KeyNotFoundException

I’m trying to import a project into our self-hosted Octopus environment from another organization. It gets as far as importing the project but it errors on trying to load the processes, variables, etc.
Exported from Octopus v2018.7.13 in the other organization.
Our current version that we are trying to import to is Octopus v2018.3.6
I’ve included a few screenshots below.



Adding error as text so that it is searchable:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Octopus.Cli.Importers.ProjectImporter.d__21.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Octopus.Cli.Importers.ProjectImporter.d__13.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Octopus.Cli.Commands.ImportCommand.d__18.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Octopus.Cli.Commands.ApiCommand.d__36.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Octopus.Cli.CliProgram.Run(String[] args)

Hi @sherodkeen

Thanks for getting in touch, sorry that you’ve run into some issues.

Looking at what you’ve provided what jumps out at me is that you are attempting to import from a newer version of Octopus into an older version (v2018.7.13 into v2018.7.13). There are major differences between these versions so this is most likely the cause of your problems.

For future reference, we require that both the source and destination Octopus versions are identical.

If you are able to upgrade your Octopus instance to match (2018.7.3) then retry the import you shouldn’t have any further problems.

Regards,
Alex

Hi @Alex.Rolley
I have upgraded to v2018.7.13 but I’m getting the same error.

image

Thank you for helping!

@Alex.Rolley Do you have any other ideas that we could check?

Hi @sherodkeen

I am very sorry that I haven’t responded to this earlier!

What I would recommend here is updating both Octopus versions to the latest Octopus LTS (2019.6.8 at time of writing). The reason for this recommendation is that we have run into a bunch of Keynotfound exceptions which have been identified and fixed between these versions. The latest version (2019.6.8) has all of these fixes included and should help resolve this problem.

After the upgrade, if you are still having problems please let me know so that we can investigate further.

Regards,
Alex