The tenants variables page is showing an System.ArgumentNullException: Value cannot be null. Parameter name: key as shown in the screenshot.
We are using Octopus 3.4.8
We have 2 Tenants having both around 30 projects assigned to them.
Only 1 of the tenants is throwing these errors on the variable pages.
Things we tried to fix it:
Checked the changelog for issues containing the word “variable” which could have fixed our issue.
3.4.8 is 1 year old. We are not planning on upgrading right now, unless we are sure this will fix the issue.
I am sorry to hear that you are having this problem, we suspect that this issue could be caused by a null value in the database.
Could you try to send a request with this URL template https://{your-server}/api/tenants/{your-tenant-id} to check the Json response, the Json document should have a property named ProjectEnvironments and there might be a null value in the array of the project similar to the following "ProjectEnvironments": { "Your project Id": [ null, "Environment-1", "Environment-2" ] }
If that is the case, you can fix this problem by doing a manual database update to the Tenant table remove the null value, it should look something like that after the update "ProjectEnvironments": { "Your project Id": [ "Environment-1", "Environment-2" ] }
or you can disconnect the tenant from the project and add it back on again, please note that this option require to setup all the tenant variables again if there is any.
Calling the api directly did throw the same error.
The json object in the Tenants table had 1 NULL value in 1 of the projects entries in this object.
We could lookup the name for this project in the projects tables.
Re-adding this project to the tenant in the octopus site solved the issue.