jeffhollan / LogicAppTemplateCreator

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

##[error]Aggregation Exception thrown, One or more errors occurred., first Exception message is: Object reference not set to an instance of an object. #145

Open David-hughes8 opened 5 months ago

David-hughes8 commented 5 months ago

I'm using the LogicAppTemplate at the being of a build pipeline in MS DevOps. Unfrotunately the inline script returns:

[error]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.

When i run: $token= & az account get-access-token --resource=https://database.windows.net --query accessToken Write-Host "##vso[task.setvariable variable=sqlToken;isOutput=true]$token"

            $token = $token | ConvertFrom-Json

            Write-Host "AccessToken:" $token

            Write-Host "Generating the template for $(ObjectName)" 
            Write-Host "From ResourceGroup: " $(DevResourceGroup)
            Write-Host " "               
            $templateO = Get-LogicAppTemplate -Token $token -LogicApp $(ObjectName) -ResourceGroup $(DevResourceGroup) -SubscriptionId $(DevSubcriptionId) 

I did put in the parameter -DebugOutPutFolder "$(System.DefaultWorkingDirectory)\" but the debug file hasn't appeared neither.

Any ideas what could be missing?

Thanks