Unattended Automation Works When I am Logged In but not when on Screen Lock

Hello everyone,

I’ve been successfully running a personal automation in the Community Edition in attended mode without any hiccups. Recently, I attempted to transition this to an unattended robot. Everything operates smoothly until the bot encounters an issue identifying a UI element in the Edge Browser.

To give a brief overview:

  1. The robot runs an Excel file.
  2. It navigates to a specific webpage.
  3. Finally, it tries to interact with a UI element that appears after clicking a button and then it fails.

I’ve employed a fuzzy selector for targeting, and have experimented with both the Chromium API and the ‘simulate’ option in attempts to rectify the problem, but to no avail. I’ve double-checked and set the screen resolution to ensure that isn’t causing the problem.

Additionally, I observed that the recording feature is non-functional when the screen is locked. However, it works perfectly when the process is initiated from Orchestrator with the screen unlocked.

Does anyone have suggestions or insights into this? Any help would be much appreciated.

Thank you in advance!

Could not find the user-interface (UI) element for this action.

Possible solutions:
• Ensure application is opened and the UI element is visible on the screen at execution time
• Edit the Target of the UI activity and use Validation to debug the issue.
• If needed, re-indicate the element as its properties might have changed
• Use “Check state” activity to check the application state before executing the action
• Increase the “Delay before” value to allow time to the application to render entirely and become responsive

at UiPath.UIAutomationNext.Activities.TargetCommonLogic.GetSearchResultAsync(IRuntimeContext runtimeContext, ITargetAnchorable target, CancellationToken token)
at UiPath.UIAutomationNext.Activities.NClick.UiPath.UIAutomationNext.Activities.IVerifyExecutionActivity.ExecuteAsync(IRuntimeContext context, IActivityData data, CancellationToken cancellationToken)
at UiPath.UIAutomationNext.Activities.Services.VerifyExecutionService.ExecuteWithVerifyAsync[T](IVerifyExecutionActivity activity, IVerifyExecutionRuntimeContext verifyContext, IRuntimeContext context, T data, CancellationToken token)
at UiPath.UIAutomationNext.Activities.NClick.ExecuteAsync(IActivityContextWrapper context, CancellationToken cancellationToken)
at UiPath.UIAutomationNext.Activities.TargetBase.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.UIAutomationNext.Activities.NCheckState.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.UIAutomationNext.Activities.NApplicationCard.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.UIAutomationNext.Activities.NCheckState.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.UIAutomationNext.Activities.NApplicationCard.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

You cannot run automations with the screen locked. It sounds like you’re logging into the server where the unattended automation is running. This is incorrect. Unattended means it runs on its own, it establishes its own session on that server. Log into the server as the robot account, click Start then SIGN OUT. Now run the unattended automation.

Also, UiPath Robot should have been installed on that server in service mode, not user mode.

Hi @postwick that’s really helpful.

To elaborate, I am running an unattended robot, which I trigger using the mobile orchestrator while my laptop is locked. The robot has my own windows credentials to log in and does begin to run a part of the automation successfully, all the time the screen stays locked. It later fails. I confess I thought it would unlock the screen when logging in to windows.

To pick up on a few of the details you have raised. I am running the process on a laptop rather than a server. In this context how does the “click start then sign out” element in your instructions work?

Also, I believe you are right, I am using user mode. Given the context and the fact I am using community edition, how do I put it in to service mode and does this need to be on a machine separate from my attended assistant?

I continue to learn and so this help is very much appreciated!

Thanks, Mark

@Mark007

  1. Using community you cannot install in service mode
  2. You can click on start , click the user icon you see and then signout…
  3. Rather try the same run from mobile keeping the laptop open

cheers

Thanks @Anil_G .

  1. That’s a real shame I can’t try it out with community given I am just trying to learn.

  2. I still don’t quite follow what you mean by start but I suspect this would become clear if I used the pro version.

  3. My process works fine with the computer unlocked. But I wanted to test if it worked from locked as most companies would not leave a laptop unlocked for security reasons.

Thanks, Mark

@Mark007

This is where you find signout

Screenlocked is not anyone would try…

unattended does not mean to run when screen is locked…but is when you have the vm or machine not signed in and let the root sign in completely

and if unattended run is given in community it can be used without license also and for same reason it has been not given I believe

cheers

That’s wicked, thanks @Anil_G .

I’m so sorry, I thought you meant signing out as in with UiPath rather than windows. When you sign out, does it not disconnected the bot? I just tried it and the process didn’t run but maybe that is because I am using it in user mode rather than service mode…

To be honest, I just want to test out running unattended, and so if the approach is to sign out rather than lock screen I am happy with that.

I wonder, why do UiPath allow you to create an unattended bot in community given it would appear you need to be user logged in anyway and therefore might as well run the process attended?

Thanks again, Mark

This is never going to work, and isn’t how unattended automations are supposed to be run. When you run an unattended automation, Orchestrator establishes its own RDP session with the computer it’s going to run on. You already being logged in is interfering with this.

I believe even non-server versions of Windows allow one or two virtual RDP sessions. So what you need to do is create another user on your laptop, add it in Orchestrator as a robot, and run your automation with that robot. This way it can establish a RDP session for that user (robot) separate from you being logged in.

But not being able to install Community in service mode will get in the way of that.

Companies who have paid for and are using UiPath in their environment would never try to run an unattended automation on a laptop. We have servers dedicated to running unattended automations (installed in service mode).

Attended automations are used on people’s individual computers/laptops for automations that require user intervention/input.

@Mark007

If the license is not given then you cannot even trigger the bot from orchestrator and this is the reason that license is given but not to actually run in unattended but to test how unattended works or would run from orchestrator

cheers

Thanks. It sounds like I just need to do a pro trial to experience this then.

Much appreciated.

Thanks

Mark

1 Like

Ah, that makes sense!

Thanks, Mark

1 Like

Hi @postwick @Anil_G I wanted to write back to you to confirm that after your guidance, I managed to get this working on my spare laptop as an unattended service with the robot logging in and logging out when it is finished. I’m really please I got over this hurdle and couldn’t have done it without your help.

Thanks again for your support on this!

Mark

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.