Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jkbryan opened this issue Nov 19, 2024 · 2 comments
Closed

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

jkbryan opened this issue Nov 19, 2024 · 2 comments

Comments

@jkbryan
Copy link

jkbryan commented Nov 19, 2024

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
Copy link

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
Copy link
Author

jkbryan commented Nov 25, 2024

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

@jkbryan jkbryan closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants