Value cannot be null. Parameter name: key | Octopus v3.4.11

To whom it may concern,

I am encountering an issue that is readily reproducible: “Value cannot be null. Parameter name: key”

Steps to reproduce:

  1. Navigate to a Project
  2. Click on “Variables”
  3. Click on “All”
    Exception is then thrown.

The path to the failing page is /app#/projects/[project]/variables/all

This is only happening on one of my 5 projects.

The log file and a screenshot of the error is attached. Please let me know if you require more information.

Cheers,
Jim

2016.11.17.OctopusCrashWhenNavigatingToProjectAllVariables.txt (3 KB)

Hi Jim,

Thanks for getting in touch!

It seems there is a Tenant mapped to this project that is causing the issue (it’s failing when it’s building the variables for each environment for the Tenant), could you check the Tenants mapped to the project and see if you can see anything out of the ordinary.

Thnaks,
Henrik

Hi Henrik,

With your tip I was able to resolve the issue. There was a tentacle that was used for a one-off deployment and then it was taken offline. This environment was added to a lifecycle and then to channels and projects.

Despite removing all channels and remapping the hacked-releases into another lifecycle/channel, the environment could still not be deleted. The project mapping for a tenant listed the environment on the main page, but when clicking on the project name and having the connected environment selection pop-up, the environment was not listed–it was on the project list page but was not visible and therefore couldn’t be removed.

Despite deleting the project refrence and re-adding it, the issue remained.

After disconnecting from all projects, and re-adding them back, the issue was resolved.

This was quite a resolution with a lot of clicking and debugging. It would have been ideal to have a better error message when displaying the null reference error, and it would also be much more desirable to perform all required actions when attempting to remove an environment: having to navigate to almost all areas within the application to try and resolve the blocking issues for environment deletion is very slow and painful. The better option would be to remove all the blockers for the user and allow them to continue.

I appreciate your help in resolving this issue–it was certainly odd and one that could not have been resolved without your help.

Cheers,
Jim

Hi Jim,

Great to hear you managed to fix the issue!

I agree that we should’ve handled the removal of the environment to prevent this error from happening. I will create an issue for us to get a fix in for this so that it doesn’t happen to other customers.

Thank you and warm regards,
Henrik