Hi, for some reason when I throw and error, the bot gets stuck indefinitely after throwing the error, and the try catch won’t execute.
As you can read on the log in this image, my sequence “_ReadPriceHistoryJson” throws a manually defined “Business Rule Error”, and inside it Retrows the error.
After that, UiPath shows the log message for the error inside the “Body” of the “for” activity. And it stucks forever and ever without doing anything else.
It is supposed to go to the BusinessRuleException catch block, but it does nothing at all.
As you can see, inside that catch block is just a Rethrow, so I don’t know what UiPath is doing. It just stucks.
Does anyone know what may be happening?
Give a try upgrading or downgrading your System.Activities Package and then try again
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.
First of all if you only want to rethrow then why are you using a try catch even?
Let the error flow as is
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.
Can you do step into and check where it is failing/stuck please
Please, check the screenshot. The execution is NOT paused. In Studio you can only do “step into” when the execution is paused.
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
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.
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
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.
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
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.
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
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.
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.
Yes mostly looks like…thats what I wanted to confirm if its stuck on sequence of throw…
Glad that your issue is resolved
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?
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?
What version of UiPath Studio did you use?
What target-framework and what language did you use in your project?
If the project uses the Windows target-framework, was it migrated from Windows-legacy at some point, by using the migration tool?
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.
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?