Bot randomly freezes


I am using UiPath to automate downloading/saving PDFs from Zendesk tickets to Google Drive. The source sheet is a Google Sheet. This process has been running fine for weeks now. The last two days, the bot will randomly freeze. Each time will be a different row it is stuck on, different log messages, etc. Seems very random. I run the remaining rows on our development server without an issue.

Does anyone happen to know why this is happening?

Thank you!

1 Like

Hello @Josh_James!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly

Something I’ve noticed. I’m not sure if this is the issue or not, but I am wondering if I could get some help writing this logic.

I notice the last few times the bot “froze” was when the Zendesk API was checking for attachments. Tickets without attachments come back with “comments” with an object below it, not referencing “attachments”. Tickets with attachments will reference “attachments” in the comments object (which it should).

The last few tickets that were “stuck” had “attachments”: with a blank array. I am wondering if the bot is being tricked into thinking there are attachments there when there are not.

Does anyone know how to write the logic that would check for that, and if found, break out of the loop? Or at least log the message and exit the activity?

Thank you!

Hi @Josh_James
Can you add a condition to check if the array is blank?

Hello - Thank you for the response. Would you happen to know how to write that condition? I’m pretty new to programming.

1 Like

Hi @Josh_James
Can you share a sample of the code?

I have a picture attached above, or are you referring to what the Zendesk API returns?

Here is what the Zendesk API returns when the attachments are “blank”. Normally, when there are no attachments, the word “attachments” won’t even show up, but every now and again, this appears.


I tried adding this IF activity, but when it finds a “blank” attachment, the sequence doesn’t even go down to that IF activity, it just exits the loop.

Can you put the foreach attachments inside the if condition?
There’s no need to loop if attachment is empty

@Josh_James Also, when you have two (nested) loops, it’s safer not to call both “item” so that you can differentiate your variables.

Like this? It still does not find a blank attachment.

Wouldn’t the variable still need “item” in its expression though?

The weird thing is, it will still exit even though the attachment is blank. I’m not 100% sure if this is why my process is getting stuck. Just an odd coincidence it got stuck on a blank attachment. But when I run this test workflow, it does not get stuck. It exits.

you can call the second one item2 for example, just to differentiate comments from attachments.
Now can you try item(“attachments”).count=0 instead in the if condition?
Can you compare the count for a blank attachment and an attachment that has records?

If I am understanding correctly, my variable for attachments would be item2 with the expression item(“attachments”) ?

if you choose to rename your variable item2 yess.
In other words, we would loop through comments (=> item) and through attachments (=>item2 if any)
but that’s a different story :grin:
Now we need to find item(“attachments”).count

Great, thank you. I’ll give this a shot and report back. Process takes a few hours to run.

No luck. The activity still “freezes”. Worked fine until it got to row 105 in the google sheet. The same sheet has “frozen” 3 separate times, all on different rows.

I think I finally got this resolved. My process hasn’t frozen for a few days now. I had a few packages that were out of date in Studio, one of them being WebAPI. That would explain why it would mainly freeze during Zendesk API calls.

1 Like