HTTP Request: Object reference not set to an instance of an object.

Rich

Member
Hi all,
Wonder if anyone can help..

I've created a process that retrieves request information, formats into SOAP XML message and POSTs to an API to create a case on the target application using the Utility - HTTP object.

The API requires client certificate authentication & as such I load the certificate using the standard Load Certificate action using the Subject Name of the cert. This gives me the thumbprint of the certificate which I then pass in the HTTP Request action.

This process is fully working end to end on my personal machine (interactive client). However, moving it on to a resource PC it fails on the HTTP call with the following, unhelpfully-generic error:

ERROR: Internal : Could not execute code stage because exception thrown by code stage: Object reference not set to an instance of an object.

I'm using the exact same client certificate & can see from the session logs that it is loading it successfully (I see the same Thumbprint both on my machine and the resource VM).

The only difference I can see in this is the fact that I have a level of local admin on my personal machine where as our 'Robot IDs' don't have any admin access. Would this cause the issue?

I am at a bit of a loss as to what the error could be and appreciate the above error message doesn't give anyone much to go on, but any thoughts would be welcomed!

Thanks,


View attachment 1591010667271.png
 

harlybake

New Member
An Object is an instance of a Class , it is stored some where in memory. A reference is what is used to describe the pointer to the memory location where the Object resides. The message "object reference not set to an instance of an object" means that you are referring to an object the does not exist or was deleted or cleaned up. It's usually better to avoid a NullReferenceException than to handle it after it occurs. To prevent the error, objects that could be null should be tested for null before being used.

Code:
if (mClass != null)
{
  // Go ahead and use mClass
  mClass.property = ...
}
else
{
  // Attempting to use mClass here will result in NullReferenceException
}
 
Top