You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

UiPath流程TryCatch无法跳转至异常分支,报Cannot start the executor错误

UiPath Windows流程中TryCatch抛出异常无法进入Catch分支且报"Cannot start the executor"问题排查

问题场景

在UiPath Windows流程的TryCatch块中,Try部分的Assign活动可正常执行,但后续添加的Throw测试活动抛出异常后,无法跳转至Catch分支,同时报错Cannot start the executor,错误堆栈如下:

system.Exception: test   at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
--- End of stack trace from previous location ---
   at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
   at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
   at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
   at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
   at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

已尝试仅在Try中保留Throw活动、更新所有包,问题仍存在。

可能的解决方法

  • 切换流程兼容模式:Windows流程分为Windows和Windows Legacy两种模式,部分Executor启动异常和模式不匹配有关。在项目设置的「Compatibility」选项中切换为Windows Legacy模式,重新运行测试。
  • 清理UiPath本地缓存:删除C:\Users\<你的用户名>\.nuget\packages下的UiPath相关包,以及C:\Users\<你的用户名>\AppData\Local\UiPath下的缓存文件,之后重新打开项目并还原依赖。
  • 验证Catch分支的异常类型:确保Catch分支捕获的异常类型包含System.Exception,直接使用System.Exception作为捕获类型(避免仅捕获特定子类异常)。
  • 以管理员身份运行Studio:权限不足可能导致Executor无法启动,右键UiPath Studio图标选择「以管理员身份运行」后重试。
  • 重装UiPath Studio:通过控制面板卸载现有UiPath Studio,下载最新稳定版重新安装,排除安装文件损坏的问题。

内容的提问来源于stack exchange,提问作者Sheryn Selvaraj

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.08 05:42:33