Impossible to catch a System.InvalidOperationException exception with Try&Catch activity

Related to @Sodam 's comment above, I was having a similar issue tonight where I could not catch the error until I removed a superfluous Sequence that I had in the Try block of my workflow.

Has this bug in UiPath been fixed in the latest versions? I’m having the issue within a Pick in 2018.4.3 - I’m wondering if it will be sorted when we upgrade. It’s affected 0.9% of my transactions.

Hi @andrewjames

I reported the bug to our team. I will update the topic when it is fixed.

1 Like

Thank you @loginerror

Hi! Long time no see team.
I’m facing same exception with parallel in retry scope today.
I set retry number to 5 but it doesn’t retry at all when exception is occurred.
Now I’m using studio 2019.10.1 stable version, community edition.

Logs as below;
11/29/2019 15:59:25 => [Debug] If Executing
11/29/2019 15:59:25 => [Debug] Retry Scope Executing
11/29/2019 15:59:25 => [Debug] Parallel Executing
11/29/2019 15:59:25 => [Debug] Sequence Executing
11/29/2019 15:59:25 => [Debug] 맨 끝페이지 확인_Click ‘A javascript:void(0)’ Executing
11/29/2019 15:59:25 => [Debug] 서버 에러_On Element Appear ‘iexplore.exe 웹 페이지 메시지’ Executing
11/29/2019 15:59:25 => [Debug] 맨 끝페이지 확인_Click ‘A javascript:void(0)’ Closed
11/29/2019 15:59:25 => [Debug] Get Text Executing
11/29/2019 15:59:26 => [Debug] Get Text Closed
11/29/2019 15:59:26 => [Debug] Assign Faulted
11/29/2019 15:59:27 => [Error] Assign: Input string was not in a correct format.
11/29/2019 15:59:31 => [Error] Sequence: Input string was not in a correct format.
11/29/2019 15:59:32 => [Debug] Sequence Canceled
11/29/2019 15:59:32 => [Info] Main execution ended in: 00:00:55

I think you cannot find second “Parallel Excuting” messages again after “Retry Scope Executing” message.

Error message as below;
19.10.1+Branch.master.Sha.0e00272ff1e0363c6709284cfa5bbf8631511d70

Message: The activity ‘WaitUiElementAppear’ with ID 928 threw or propagated an exception while being canceled.

Exception Type: System.InvalidOperationException

RemoteException wrapping System.InvalidOperationException: The activity ‘WaitUiElementAppear’ with ID 928 threw or propagated an exception while being canceled. —> RemoteException wrapping UiPath.Core.Activities.ActivityTimeoutException: Activity timeout exceeded
at UiPath.Core.Activities.WaitUiElementAppear.EndExecute(NativeActivityContext context, IAsyncResult result)
at UiPath.Core.Activities.AsyncNativeActivity1.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) --- End of inner exception stack trace --- at UiPath.Core.Activities.WaitUiElementAppear.EndExecute(NativeActivityContext context, IAsyncResult result) at UiPath.Core.Activities.AsyncNativeActivity1.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

image

I had this same problem. To fix the issue of not catching the exception, I followed these steps:

  1. Extract Problematic Logic into a separate workflow
  2. Set the “Isolated” Property of the “Invoke Workflow” Activity to True. This causes the problematic workflow to execute on it’s own thread, so it doesn’t have the ability to propagate exceptions through a Try-Catch.
  3. Surround the “Invoke Workflow” activity with a try catch.
2 Likes

Just a small update. The issue should be fixed in the latest studio 2021.10 and on the latest package versions.

This bug was not fixed with 2021.10 updates. I tried tap activities in trigger (Mobile Automation) and I am still facing this issue. My project dependencies are as follow:
“UiPath.Excel.Activities”: “[2.11.4]”,
“UiPath.Mail.Activities”: “[1.12.2]”,
“UiPath.MobileAutomation.Activities”: “[21.10.2]”,
“UiPath.OCR.Activities”: “[3.3.2]”,
“UiPath.System.Activities”: “[21.10.3]”,
“UiPath.Testing.Activities”: “[1.4.6]”,
“UiPath.UIAutomation.Activities”: “[21.10.5]”

Due to this topic being quite old, would you mind creating a new topic with full title and description of the issue you are encountering (including screenshots or gifs). It would help a lot.

The right category would to post this topic would be #user-voice:mobile-automation