stefanstranger / logicappdocs

Generate technical Markdown documentation for your Azure Logic App and Power Automate Flows
MIT License
55 stars 4 forks source link

You cannot call a method on a null-valued expression. #41

Closed jkbryan closed 1 day ago

jkbryan commented 1 week ago

Describe the bug For my Logic Apps which contain a condition section, I see the following error on run:

Sort-Action: C:\TEMP\logicappdocs-main\src\New-LogicAppDoc.ps1:219:1 Line | 219 | Sort-Action -Actions $objects | ~~~~~~~~~ | You cannot call a method on a null-valued expression.

I can document my other Logic Apps which do not contain a condition without issue.

To Reproduce Steps to reproduce the behaviour:

I have created a copy of a Logic App (LA-SendPreOnboardingMail), which I can successfully document with the script. I added a simple condition to the copied Logic App (named LA-DocumenterTest) to reproduce. I get the same result when trying to document the Logic App with the condition statement (Manager surname = Smith).

If possible upload the Logic App Flow or Power Automate Flow code. LA-Samples.zip

Screenshots

Screenshot 2024-11-19 164254

PowerShell version: Run $PSVersionTable command in PowerShell host Name Value


PSVersion 7.4.5 PSEdition Core GitCommitId 7.4.5 OS Microsoft Windows 10.0.22631 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

gooseleggs commented 3 days ago

I am not the maintainer of the project. However I have looked at this, as I am working on providing some improvements to the script. You are suffering the same issue as #39. Can you try the fix that I put in there and verify all is OK. I am working on a pull request for it.

jkbryan commented 1 day ago

@gooseleggs - many thanks for your reply. I just tested this solution and it worked perfectly - Thank you!