Getting an “object reference not set to an instance of an object” error when deploying a custom connector?

By | August 24, 2023

If you created a very minimal custom connector and looked at the swagger definition right after, you’d notice a bunch of attributes added by default:

However, not all of those are literally “required” when creating a new connector. For example, I could have removed “schemes” node, and it would still be acceptable:

The problem would occur later, though. Once you’ve exported the solution that includes such a connector, you wouldn’t be able to import it to another environment – you’d be getting an error:

“FAILURE: Object reference not set to an instance of an object”

(Which reminds me that, behind the scene, low code is probably still pro-code 😂)

Why does it matter? Well, it depends on where you start.

It took me almost a full day to figure out why my solution import was failing, since I actually started with a swagger definition that had over 2K lines in it, and, it took me some time to slowly eliminate all those lines to arrive at that minimum definition only then to realize that I was simply missing the “schemes” node in the original swagger.

In other words, if you run into the “object reference” error when deploying your custom connector, check the basics and make sure all those “default” nodes are present in your swagger definition.

Leave a Reply

Your email address will not be published. Required fields are marked *