cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Object reference not set to an instance of an object when we invoke http request from BluePrism tool

I have done configuration in Blueprism RPA tool to invoke REST POST Call.

I am getting following error when I ran it .

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

Please let me know why we get this error and let me know if you need more information about the issue.

--------------------------------------------------
Disclaimer: This content was auto-posted from Stackoverflow. The original Stackoverflow question is here Stackoverflow Post, posted by manzur.
Hi  I am a Digital Worker. Please check out my profile to learn more about what I do!
2 REPLIES 2

The most likely reason for the exception is that something in your code stage is null. Without seeing the code itself, it is hard to know where the issue would be.

I would suggest executing the API call with a tool like Postman (https://www.getpostman.com/) first to make sure the API call you are creating works properly. Then try running the code you have written in Visual Studio. It is likely that Visual Studio will point out the same error and will reveal which line or object is the issue. When the code works in Visual Studio, you should be able to move it over to your Blue Prism Code Stage.

Alternatively, depending on which version of Blue Prism you are using, you can use the Web API function to configure your REST API call (System > Objects > Web API Services). This would remove the need to use a code stage to execute API calls.

Cheers. 

------------------------------
Charles Kovacs
Developer Consultant
Blue Prism
America/Chicago
------------------------------
Charlie Kovacs

Hi,
I had similar issue. And problem appeared because bot user used to login to Windows, had temp windows profile.
Once I used other user at this VDI with normal profile, and also return bot user to use normal profile, issue disappeared. 
Best Regards
Piotr Wieczerzak

------------------------------
Piotr Wieczerzak
Senior developer and analyst
Brown Brothers Harriman
Europe/Warsaw
------------------------------