jeffhollan / LogicAppTemplateCreator

Script to convert Logic Apps into templates for deployment
MIT License
143 stars 74 forks source link

Get-LogicAppTemplate throws Aggregation Exception #75

Closed guruaravinth closed 4 years ago

guruaravinth commented 4 years ago

Hi, While trying to export the deployment template for a LogicApp, we are facing the below error:

Get-LogicAppTemplate : Aggregation Exception thrown, One or more errors occurred., first Exception message is: Object reference not set to an instance of an object., for more information read the output file. At line:1 char:1

As suggested in other similar issues, I tried adding the tenant. But even after using the Tenant, it's throwing the same error. I am guessing this has to do with the SQL server API connection used in my Logic App.

I was able to export LogicApps successfully that are using old version of SQL server API connections. But when I am using new API connection version that lets us pick the Authorization method (like Azure AD, Windows, etc.) I am facing this error.

Can you please look into this?

Thanks.

Navagiasostis commented 4 years ago

Are you trying to download multiple templates with ARMClient? If so, I had the same error randomly appear to me as well. I tried lot's of things but I just ended up using a try()...catch() method twice inside my script in order to repeat the download when it fails the first time. Not a perfect solution, but it works...

MLogdberg commented 4 years ago

Hi, if it’s sql make sure you have the latest version since introducing changes to version we missed a change of datastructure in the api. It’s fixed in the latest version.

guruaravinth commented 4 years ago

Thanks for the reply. I pulled the latest version and it's working now!!