UiPath not responding/not throwing error

I am running a robot that post orders in an ERP system. After about 20-30 minutes, the ERP system crash. It crashes in different ways, and produce different pop-up boxes. I have programmed the robot to respond to system errors by running a powershell script to close the program. However, for one of the pop-up boxes that appear, the robot does nothing (for the other pop-up boxes an activity timeout is thrown, so that the robot goes on to handle the error). For this specific pop-up there are no activity timeouts thrown, so that the robot never get to the error handling part. It can run for several minutes (it has never actually stopped by itself, I have had to manually stop the process). When I move the mouse pointer, I see that it is loadning (blue spinning circle).

Any tips on how to fix this?

Use do while and handle the popup in Uipath Studio.
Whenever the popup will appear, the robot will attach and click on the OK/Cancel Button as required.

Can you please upload workflow flie?