web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate Desktop...
Power Automate
Unanswered

Power Automate Desktop cannot invoke scripts with input or output variables

(0) ShareShare
ReportReport
Posted on by 69

Message = Object reference not set to an instance of an object.
Error = System.NullReferenceException
Full text = System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Flow.RPA.Desktop.Console.UI.Services.Workflow.RunWorkflow.Runners.RunWorkflowBaseService.<DownloadAndPrepareAndRunInnerAsync>b__27_0(IPackageInfo package)
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
at Microsoft.Flow.RPA.Desktop.Console.UI.Services.Workflow.RunWorkflow.Runners.RunWorkflowBaseService.<DownloadAndPrepareAndRunInnerAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Flow.RPA.Desktop.Console.UI.Services.Workflow.RunWorkflow.Runners.RunWorkflowBaseService.<DownloadAndPrepareAndRunAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Flow.RPA.Desktop.Console.UI.ViewModel.Processes.MyProcessesTabViewModel.<StartProcessAsync>d__236.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Flow.RPA.Desktop.Console.UI.ViewModel.Processes.MyProcessesTabViewModel.<StartProcessInnerAsync>d__237.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Flow.RPA.Desktop.Console.UI.ViewModel.Processes.MyProcessesTabViewModel.<ResolveItemAndExecuteCommandAsync>d__226.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Flow.RPA.Desktop.Console.UI.ViewModel.Processes.MyProcessesTabViewModel.<StartProcessAsync>d__235.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Can you please share a screenshot of the script/action you used?

  • JeffreyDSmith Profile Picture
    69 on at

    It won't help much. I have been fighting buggy Power Automate Desktop for over a year. I only caught the error details only twice. The rest were merely vague "Something went wrong" messages. Even this screenshot is just the vague error message.

    Screenshot 2024-01-16 100013.png
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    This is because you are launching a different desktop flow and do not have proper error handling in there. So, whatever error makes your child flow fail will also cause the parent flow fail, too.

     

    This has nothing to do with the error you originally posted about, however. What's the script you are trying to invoke?

  • JeffreyDSmith Profile Picture
    69 on at

    Here is the called script in Word format, because txt format is unsupported here. It looks at the input variable "Base_Name" to determine what values to store into its output variables. This was working just a couple days ago with no change. I don't understand how it could fail. The error reporting is very vague and too limited to be of any use.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Oh, so by "script" you actually mean a desktop flow that you call from another desktop flow? I thought you meant a script as in a PowerShell script, or a Python script or something like that. That's where the misunderstanding is coming from. 

     

    Anyway, it does seem like your flow is able to call other flows just fine. But if the child flow fails, then the parent flow will also fail. The error returned is what it is because you have not set up any error handling or logging in your flows. Those, unfortunately, do not come out of the box in PAD, and you need to set them up yourself by using On block error to capture the error and then possibly using Get last error in combination with, for example, Write text to file to log the error in some file. 

     

    I recommend watching this video for some references on error handling and logging in PAD: https://www.youtube.com/watch?v=QjrxLPg_TdI&ab_channel=AndersJensen

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • JeffreyDSmith Profile Picture
    69 on at

    Sorry, you didn't help at all. PAD is broken. Catching the error doesn't solve the orignal problem. Others have also reported seeing null reference errors, and I reported disappearing flows and incorect copy & paste in the PAD editor. It is omitting input and output varaibles when copying the flow with ctrl C. See other posts for details.

  • JeffreyDSmith Profile Picture
    69 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 273 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 172 Super User 2026 Season 2

Last 30 days Overall leaderboard