Outsystems Extension Object reference not set to an instance of an object error

Hi All,

I’ve developed an Outsystems Extension to consume a 3rd party SOAP API with a custom request using C#. The extension builds successfully in VS 2017 without errors.  However, when I use the extension within a server action in my project, I get the following error at runtime;

Object reference not set to an instance of an object.


I have tested my C# code in a console app and it complies and runs without errors and return the required results.

When looking at the application error log in Service Center the following error is listed;

Object reference not set to an instance of an object.

PID: 3904 ('w3wp', Started='8/16/2021 1:45:20 AM', Priv=1752Mb, Virt=2108159Mb)
TID: 191
Thread Name: .NET: 4.0.30319.42000
Client Runtime Packages: client-runtime-core= 3.9.2;client-runtime-view-framework-react= 2.10.4;client-runtime-widgets= 2.10.4;
Client-Side Log

OpenSession2
System.NullReferenceException: Object reference not set to an instance of an object.
at Object.s [as getException] (https://xxxxxxxxxx..com/TestHarness/scripts/OutSystems.js?oay51q5QPx9P8Xmw2HkooQ:2:10083)
at c.onSuccess (https://xxxxxxxxxx.com/TestHarness/scripts/OutSystems.js?oay51q5QPx9P8Xmw2HkooQ:3:6054)
at XMLHttpRequest.<anonymous> (https://xxxxxxxxxx..com/TestHarness/scripts/OutSystems.js?oay51q5QPx9P8Xmw2HkooQ:3:1470


My code has a try catch implemented but the error doesn't seem to come from my exception handler, I am stumped why is error is occurring as all objects are created within my C# code which I have attached.  Any help will very much appreciated 


Thanks in advance  

CCode.txt

mvp_badge
MVP

Hi DK,

Looking at that Stack trace, it doesn't seem the error is coming from your extension at all, as the error occurs in OutSystems.js, which is JavaScript. Have you debugged your program? Have you checked whether the exception is actually generated inside the Extension Action?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.