Hello Thwack Community!
My name is Ian, and I am a new member here.
We have developed an automation for SolarWinds NCM to modify a custom property by invoking the ModifyCustomProperty function. It has been working properly on our dev server, but we are getting the error message below in our prod server. Does anyone have an idea on what the error is about and/or encountered the same issue?
Error Message:
{
"Message": "Object reference not set to an instance of an object.",
"ExceptionType": "System.NullReferenceException",
"FullException": "System.NullReferenceException: Object reference not set to an instance of an object.\r\n at SolarWinds.Orion.Core.Common.DALs.InlineCustomPropertyDAL.ChangeCustomPropertySize(SqlTransaction transaction, CustomProperty prop)\r\n at SolarWinds.Orion.Core.Common.DALs.CustomPropertyDAL.ModifyCustomProperty(SqlConnection connection, SqlTransaction transaction, CustomProperty newProperty, CustomProperty originProperty)\r\n at SolarWinds.Orion.Core.Common.DALs.CustomPropertyDAL.ModifyCustomProperty(SqlConnection connection, CustomProperty newProperty, CustomProperty originProperty)\r\n at SolarWinds.Data.Providers.Orion.Verbs.NodesCustomProperties.ModifyCustomProperty(SqlConnection connection, CustomProperty property)\r\n at SolarWinds.Data.Providers.Orion.Verbs.CustomProperties.ModifyCustomProperty(String PropertyName, String Description, Nullable`1 Size, String[] Values, Dictionary`2 Usages, Boolean Mandatory, String Default, String SourceId, String SourceName, String propertyDisplayName)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at SolarWinds.InformationService.Verb.VerbExecutor.ReflectionInvocation(Object hostInstance, Object[] parameters)\r\n at SolarWinds.InformationService.Verb.VerbExecutorContext.Invoke()\r\n at SolarWinds.InformationService.Core.InformationService.Invoke[T](String entity, String verb, Action`1 setupParameters, Func`2 extractReturnValue)",
"status": 400
}
SolarWinds Version:
Dev:

Prod:

Working Scenario (Dev):
POST
https://172.31.131.109:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.NodesCustomProperties/ModifyCustomProperty
Headers:
Same in both dev and prod requests
Request:
{
"PropertyName": "CustomerName",
"Description": "Customer Name",
"Size": 400,
"Values": [
"Test33",
"Test",
"Test55",
"(99999) Automation Bank"
]
}
Response:
{
"body": null,
"headers": {
"content-length": "4",
"content-type": "application/json",
"server": "Microsoft-HTTPAPI/2.0",
"strict-transport-security": "max-age=31536000,includeSubDomains",
"date": "Tue, 14 Feb 2023 15:48:32 GMT",
"connection": "close"
},
"status": 200,
"statusText": "OK"
}
Non-Working Scenario (Prod):
POST
https://hostname:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.NodesCustomProperties/ModifyCustomProperty
Headers:
Same in both dev and prod requests
Request:
{
"PropertyName": "CustomerName",
"Description": "Customer Name",
"Size": 400,
"Values": [
"Value 1",
// //
"Value 179",
"New Value"
]
}
Response:
See error message above
Actual Word Count of Values Array as per Microsoft Word:

Troubleshooting:
We tried sending a different payload in our request to our prod server in this format but received a different error.
Request:
{
"PropertyName": "CustomerName",
"Description": "Customer Name",
"Size": 400,
"Values": [
{
"Value": "Value 1"
},
// //
{
"Value": "Value 179"
},
{
"Value": "New Value"
}
]
}
Response:
{
"Message": "Verb Orion.NodesCustomProperties.ModifyCustomProperty cannot unpackage parameter 'Values' (#3) with type System.String[]",
"ExceptionType": "SolarWinds.InformationService.Verb.VerbExecutorException",
"FullException": "SolarWinds.InformationService.Verb.VerbExecutorException: Verb Orion.NodesCustomProperties.ModifyCustomProperty cannot unpackage parameter 'Values' (#3) with type System.String[] ---> Newtonsoft.Json.JsonReaderException: Error reading string. Unexpected token: StartObject. Path 'Values[0]'.\r\n at Newtonsoft.Json.JsonReader.ReadAsString()\r\n at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)\r\n at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)\r\n at SolarWinds.InformationService.Verb.VerbExecutorContext.<>c__DisplayClass26_0.g__GetParameterByIndex|0(Int32 index)\r\n --- End of inner exception stack trace ---\r\n at SolarWinds.InformationService.Verb.VerbExecutorContext.<>c__DisplayClass26_0.g__GetParameterByIndex|0(Int32 index)\r\n at SolarWinds.InformationService.Verb.VerbExecutorContext.CreateParameters(Func`2 getParameterAt, Int32 parametersCount, Stream stream)\r\n at SolarWinds.InformationService.Verb.VerbExecutorContext.UnpackageParameters(JObject parameters)\r\n at SolarWinds.InformationService.Core.InformationService.Invoke[T](String entity, String verb, Action`1 setupParameters, Func`2 extractReturnValue)",
"status": 400
}
We do not own/manage the server where NCM is running on, but we can engage that team if we need server-level logs/troubleshooting.
Any lead/info would be greatly appreciated.
Thank you very much!