Summary
This article explains the causes and solutions of the “System.ObjectDisposedException: Cannot access a closed pipe” error that can occur due to a breakpoint positioned right before entering the Flowchart activity in UiPath Studio projects.
Error Details
- UiPath Studio Version: 25.0.166-cloud.20075
- Error Message:
System.ObjectDisposedException: Cannot access a closed pipe.
at System.IO.Pipes.PipeStream.CheckWriteOperations()
…
at UiPath.Executor.Debugger.Client.Services.RobotExecutorProxy.StepIntoAsync()
Observed Conditions:
- Occurs when running in Debug (F7) mode.
- The breakpoint is placed right before entering the Flowchart activity.
- When “Continue” or “Step Into” is selected, Studio crashes with the error.
- The flowchart runs smoothly when using Run (Ctrl+F5).
- The error is not encountered if the breakpoint is moved inside the Flowchart.
Root Cause of the Problem
The UiPath Studio debug feature establishes inter-process communication (IPC) between the robot and Studio. However, in some cases:
- A breakpoint stopped just before entering the Flowchart,
- Timing issues with the Debugger,
lead to an improper closure of this communication channel, causing the “closed pipe” exception.
Temporary Solution
- Move the breakpoint inside the Flowchart.
- Test using Run instead of Debug.
- Remove the breakpoint and recompile the project.
Permanent Recommendation
- Use a stable version of UiPath Studio.
- When placing breakpoints, consider the flow structure.
- A bug report can be submitted to UiPath.
Affected Components
- Flowchart activity
- UiPath.Debugger
- System.IO.Pipes
- Breakpoint mechanism
- Studio – Robot communication (IPC)
Note
This error is not limited to a specific template; it may occur in any UiPath project, especially when working with structures like Flowcharts during the debug process. Developers are advised to take this into account when positioning debug points.