Could not find the user interface ui element - getting this error randomly

Hello,

we are running automations on our remote server and we have attended enterprise license.
we are publishing nupkg package in folder and scheduling as a batch file in task schedular.
sometimes i have observed that page is suddenly closing or comming back to login after login and randomly getting “could not find the user interface ui element” error at any point while running.

when i debug the same scriupt again for same input file that time works fine.

why this is happening ad what is the solution to avoid this so my script can run smoothly

help me on same.

Hi @Mathkar_kunal

can you check below threads that might help,

Happy Automation
YK

i have downloaded and install UiPath Remote Runtime
anything i ned to do after installing? or it will work by its own?
what is the exact purpose of this application?
and how can i confirm this is running?

That is the application where it taking care about the execution part, just give a try and see whether you are stilling facing the issue.

ok but after instaling i dont need to do anything right

Hi @Mathkar_kunal ,

It seems there may be an issue with the workflow for UI activities. The page or application might not be fully loaded when the bot attempts to perform actions. In Debug mode, the application gets additional time to load properly, which is why the workflow works successfully during debugging.

During execution, it is important to validate the UI state before performing any action. You can use activities such as Check App State, Element Exists, Retry Scope, or proper wait conditions to ensure the application is ready.

You can also use Remote Runtime to debug the project remotely without logging into the VM directly. However, since this is an attended bot, it would be good to review the execution logs to identify the exact issue, such as selector failures, page load delays, or application responsiveness issues.

In your scenario, the “UI element not found” error most likely indicates either:

  • the page is not responding within the expected time, or
  • the selectors are not properly fine-tuned/stable for the application.

Thanks

Hi @Mathkar_kunal

This happens because your bot is running in an unstable remote session (lock, logout, refresh), so UI elements change and selectors fail. It works in debug because the session is active. To fix this to use Unattended Robot via Orchestrator, keep the session stable, and use strong selectors with retry logic.

as i said i have downloaded remote runtime on my remote. Can you please update how can i check on task schedular logs generated by remote runtime?
in script i have already used check app state

ok , but my remote session is stable. Then how it is unable o find or interact with interface?