Try Catch Stucks Indefinitely

Already tried. While googling the error it was a suggestion that I found, but it didn’t help. I’m currently at v22.10.5 for that Package. I was using 23.4.2 when it happened first time.

@Axel_Albert

First of all if you only want to rethrow then why are you using a try catch even?

Let the error flow as is

cheers

Hi @Axel_Albert ,

Have you also tried Debugging the workflow and check where exactly it is getting stuck if at all it is ?

The screenshot I provided was running on debug mode, you can see it because I’m able to pause the execution on Studio.
That button that allows me to pause the execution shows that the execution is currently running. And the log shows exactly where it is… Which is stucked at the “body” of the “for” activity.

I wanted to do more stuff, but I won’t unstuck, so I didn’t yet.

@Axel_Albert

Can you do step into and check where it is failing/stuck please

cheers

Please, check the screenshot. The execution is NOT paused. In Studio you can only do “step into” when the execution is paused.

@Axel_Albert

Give a break point on any of the activities and please perform step into from there…may be on for loop you can give the breakpoint

cheers

The workflow which throws the error already has a breakpoint. You can also see it on the screenshot. When I execute that workflow and the error occurs and is then rethrowed from within, studio stucks.

@Axel_Albert

As per screenshot the error occured on the next invoke workflow file and the breakpoint is on the previous…from the breakpoint do not continue…instead do step into to check and confirm that it is stuck on catch block or the loop

Cheers

Oh, yeah. My bad about the breakpoint. Just to clarify:

This is the error.

Here is where is thrown.

Inside the Catch for “ReadPriceHistoryJson” is just a Rethrow too (for now).

Here (after is thrown) studio stucks (but does not pause, and it won’t allow me to pause).
I know it’s here because I execute in debug, and when you throw an error in debug, the execution pauses and you can as many “step into” as you want. When the focus of the execution comes here and I press “step into”, studio stucks.

@Axel_Albert

Can you please remove that last for loop and add again…lideally you should see a sequence around…looks like a onetime issue…if you add again then it might work as expected

image

Cheers

All sequences are hidden in the new version of Studio for non windows-legacy projects.
With this I mean that adding the “for” again will add a hidden sequence called “body”, as this “for” did.

@Axel_Albert

I see try catch and sequence available when the system package version is 23.4

I believe you degraded to 22.10 and now only for for its not

I agree there is a feature for the same but it looks different here…and it looks like stuck on the for loop and not on rethrow…this action is to just confirm and rule out the issue

Cheers

EDIT:

The option to show or not show sequences is listed here. I have it activated.

After I degraded the version I indeed added the “for” again just in case, but the sequences are all still hidden.

This is how a freshly added (and unmodified) “for” looks like in my studio.
image

If I add stuff it looks like this

After I deactivated the “hide sequences” option, Studio stopped stucking. I just executed it and it worked.
It seems to be a bug related to the hidden sequence.

1 Like

@Axel_Albert

Yes mostly looks like…thats what I wanted to confirm if its stuck on sequence of throw…

Glad that your issue is resolved

Cheers

1 Like

Hi @Axel_Albert ,

I’ve looked into your issue and tried to create a project based on the provided screenshots, so that I could get as close as possible to your setup. However, I could not reproduce the error in my setup, with Hide Sequence setting set on both true or false.
Even though the issue was fixed for you by disabling the Hide Sequences setting, it would help us to understand why exactly this issue occurred, so could you, please, provide some further guidance?

  1. Did you get any error message when you force-aborted execution for the debugging sessions that got stuck? If so, could you, please, attach the output of the UiPath Diagnostics tool?

  2. What version of UiPath Studio did you use?

  3. What target-framework and what language did you use in your project?

  4. If the project uses the Windows target-framework, was it migrated from Windows-legacy at some point, by using the migration tool?

  5. Did you use a Pick activity in your project? Asking this because we have a known issue around using the Try Catch activity inside a Pick container that leads to a very similar behavior to the one you were experiencing.

  6. If possible, could you, please, attach the project? I noticed you’ve hidden some details in your screenshots, so I assume the project includes some sensitive data. If so, could you, please, provide a version of the project where you remove the sensitive data?

Thank you!

1 Like

Hi, sorry for the delay.

  1. I didn’t get any error. Hitting “stop” worked perfectly for stopping the debug execution.

  2. Studio 2023.4.1

  3. The project is on “Windows” compatibility mode, using VB.net, and it’s the REFramework (modified to work with offline files, without Orchestrator).

  4. It was created brand new. I did copy pasted some activities from the old version of this project which was in Windows-Legacy mode, but mostly clicks and so on, so I didn’t need to capture the selectors again.

  5. I wasn’t aware of that problem about the Pick. I don’t have any in this project, but I use that activity in other ones and never had any problem.

  6. Sorry. I would have to remove many things in order to be able to share it. Also I kept working on the project and it has changed from that point in time. The workflow is still there, but the “process.xaml” structure has changed, affecting this workflow. Also the workflow is no longer inside a for each, because I changed it the “for” for a flowchart.

Hi,

I got this similar issue, whenever the bot throw an error, this was never happened except after I added try-catch (Figure 2). Now, it is randomly happened.


Figure 1: This is the last log message in the Orchestrator. Latest at the top-most.


Figure 2: This is the parent sequence where the running process got stuck (might be either due to the try-catch that just added or the if statement).


Figure 3: This is the Analyze Document.xaml. The error occurs in the No Persist Scope > Try Get Result of Extraction > Retry Get Result of Extraction > Check False.


Figure 4: In the Try-Catch, I throw a custom error. Based on the log message, this is the last execution.

image
Figure 5: This is my Studio version

image
Figure 6: This is the dependencies.

image
Figure 7: This is the project settings.

Regards,
Azeem