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

Hi @Mikko

Could you try to wrap your activities in each branch in their own Try-Catch? It might help a little, hopefully.

How does one report a bug?
I would say that is definetly a bug…

I moved section with own Workflow and added call of that new workflow into try section. Then try-catch works but not in the same workflow.

Hanki Outlook for Android

Hey, guys! Any news on that?? I am having the same problem but instead of using pick branches I’m using OCR enggines. It seems that it’s not only one error in my case, but I used System.Exception and it’s not working either

@loginerror please report this problem as a bug to be solved for a future release.

Thank you.

Hi @jcob

If you have access to Studio Community Edition, then see here for the easiest way to report bugs starting from 2019.7 :slight_smile:

Any work around for this or recommendation on another activity etc…? Thanks!

I’ve found many posts reporting similar cases in forum posted since 2017 but it seems not fixed until now :confused:
I don’t know why exactly but, I guess it is related with pick and pick branch activities… because I’m using pick activity now and same error is occurring.
And other posts are using same thing. Pick and pick branches.

1 Like

@pablito @loginerror please report this as a bug

1 Like

As a result of a week using the activity, I guess two problems with pick:

  1. When pick and pick branches are used with element activities, they makes both of InvalidOperationException and ActivityTimeoutException in one time intermittently.
  2. Try Catch activity cannot catch exceptions from 1’s case.

And… it’s just FYI, I moved them out from some element containers (e.g. attach browser, element scope…) and they works well and makes no exception. I tested it over 5 hours… and no exceptions until now. Hope this can be helpful if you’re going to report this bug.

1 Like

Hi @Sodam

What do you mean by:

I moved them out from some element containers (e.g. attach browser, element scope…) and they works well and makes no exception

?

Hi @loginerror

I meant, I was using pick inside of attach browser, because I wanted to make them work inside chrome window. And they made exceptions.
Then I changed attach browser to element scope, they also made exceptions.
And I separated pick activity to other .xaml file and invoked it into main workflow. It didn’t make any exceptions.
After then, I got them back into main workflow, not invoked, just replaced to outside of containers, and they didn’t make any exceptions too.
Hmm… is it understandable? I’m sorry for my bad English. :frowning:

Almost all clear, don’t worry :slight_smile:

I suppose a screenshot of the working scenario would help me get it fully:

After then, I got them back into main workflow, not invoked, just replaced to outside of containers, and they didn’t make any exceptions too.

1 Like

I’ll upload it tomorrow. Here is UTC +9 and now is overtime work. :smiley:
Thank you for your understanding!

1 Like

Hi @loginerror

I tried to occur same error whole day but failed :frowning:
I don’t know why but I made workflow totally same with yesterday… and failed to occurring error.
So I’m uploading a file that include the same workflow. Sample.xaml (37.4 KB)
This file was made on 2019.10.0-beta.484 community edition and the error threw on 2018.2.3 Enterprise edition.
Maybe it was not element container’s side… sorry :frowning:

Hi @jcab,

I’ve faced the same issue, but I have found a way out from this situation.

To handle this, I’ll suggest you to

  1. Put that pick activity with all branches in one separate sequence and Invoke that sequence (pick) in your main sequence.
  2. Now, use Try&Catch and put Invoke Workflow in try block and catch the exception.

This worked for me, I hope it’ll work for you too. :slightly_smiling_face:

One more thing…

@loginerror
I don’t know it is bug or not but I’ve created one Topic in Ideas section, have a look if you want.
here’s the link —> Pick activity should come with one Default branch

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