Automatic job fail when I running unattended bot when working minimizing or close Remote Desktop ( But working fine when maximize remote desktop)

Hello, I am new for uipath.
I do the automatic job on Orchestrator in work station PC (remote desktop to another computer)
Please anyone help me. I don’t know the root cause and solution to fix it.
Thank you very much.

Problem: Automatic job fail when I running unattended bot when working minimizing or close Remote Desktop ( But working fine when maximize remote desktop)

Step Fail : Open web > Click menu > export file

Step Capture


image

Log Fails

Process: xxxxxx
Environment:
Robot: xxxxxx-unattended
Account: xxxxxx
Machine name: xxxxxx
Info: Multiple similar matches found.

Could not uniquely identify the user-interface element for this action.
Edit the element, run Validation, and add anchors in order to ensure the element is uniquely identified.

RemoteException wrapping UiPath.UIAutomationNext.Exceptions.NodeAmbiguousException: Multiple similar matches found.

Could not uniquely identify the user-interface element for this action.
Edit the element, run Validation, and add anchors in order to ensure the element is uniquely identified.
at UiPath.UIAutomationNext.Activities.TargetCommonLogic.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.UIAutomationNext.Activities.NClick.d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.UIAutomationNext.Activities.Services.VerifyExecutionService.d__4`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at UiPath.UIAutomationNext.Activities.NClick.d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
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 where exception was thrown ---
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)
Start Time: 08/25/2022 12:40:01 AM
End Time: 08/25/2022 12:40:45 AM
Input Values: null
Output Values: Empty
Has Recording: false

Log
Click ‘DIV’: Multiple similar matches found. Could not uniquely identify the user-interface element for this action. Edit the element, run Validation, and add anchors in order to ensure the element is uniquely identified.

use maximize window once you launch the browser

image

Many thank for your reply sir.

Could I use this activity only first step when open browser website right?

it seems like your click activity selectors are not unique enough and they return simiiar matches when processing.

yeah, you need to use once you open the browser

Ok. I will try.

Could you please suggestion for me? about do activity selectors unique.
I try many time but the result are same and I am not sure that I do correct or not.

post your selectors here , will validate

As you mentioned this and no one has addressed this aspect yet, I bolded the two that likely apply to your scenario.


I did some testing on this a while back which can be read here

Short summary

  • RDP in Console mode will connect to the remote host on Session 0 (typically this will be 800x600 or 1024x768)

  • RDP in Interactive (Console: False) behaviour will depend on on your remote hosts Policies / Configurations. Which can be configured to only allow one session per credential, so any new session will take over an existing session if it exists, or it could be configured to allow multiple sessions for the same credential/profile. See above link for resolution test scenarios

  • RDP by default will suppress the UI essentially virtually locking the screen if you minimize the RDP Window (Look up RemoteDesktop_SuppressWhenMinimized or see Robot - Executing Tasks in a Minimized RDP Window)

  • Closing the RDP Window/Session will by default lock the session interfering in a similar way to minimizing the window. In order to work around this you need to either A) Leave the Window open until the Job is complete B) Send the Session to the Console by issuing the command tscon %sessionname% /dest:console. B isn’t ideal from a security perspective as you are leaving the console session unlocked and vulnerable to someone that physically gains access to the host or the console view in the VM Controller.

As noted, there wouldn’t be an issue taking over an existing session if you didn’t logout, but it’s always nice to ensure you start from a fresh session or if nothing else to free up memory. This is something I do frequently during Development, Testing, or I want to observe the job in real-time in production, it’s not recommended, but if you are connecting to the session simultaneously you should definitely perform some tests of your own to become familiar with the nuances and issues you can run into.

Stop logging into servers that run unattended automations. It interferes with Orchestrator. Unattended means no user interaction.

Log in with your robot account, then SIGN OUT from the start menu. Don’t just close the RDP window. SIGN OUT.

Now run your unattended job via Orchestrator. It establishes its own session.

As I understood about running the automatic job from uipath (automatic trigger).
I try on these solutions and found that

  1. Windows task schedule.
    Automatics task can run only when I set on task schedule: “Run only when user is logged on”

  2. Orchestrator.
    Automatic task can trigger and run normally all steps both of user lock screen desktop or not, except step about relate with screen (go to web site, click menu, click export file.)

Please clear my wonder that I think these limitation of community version of uipath right?

As I understood about running the automatic job from uipath (automatic trigger).
I try on these solutions and found that

  1. Windows task schedule.
    Automatics task can run only when I set on task schedule: “Run only when user is logged on”
  2. Orchestrator.
    Automatic task can trigger and run normally all steps both of user lock screen desktop or not, except step about relate with screen (go to web site, click menu, click export file.)

Please clear my wonder that I think these limitation of community version of uipath right?

As I understood about running the automatic job from uipath (automatic trigger).
I try on these solutions and found that

  1. Windows task schedule.
    Automatics task can run only when I set on task schedule: “Run only when user is logged on”
  2. Orchestrator.
    Automatic task can trigger and run normally all steps both of user lock screen desktop or not, except step about relate with screen (go to web site, click menu, click export file.)

Please clear my wonder that I think these limitation of community version of uipath right??

No. As I said, if you are running unattended, don’t be logged into the server. If you previously logged in and then just closed the RDP window, you have left the session connected. Log back in, then SIGN OUT from the start menu.

Kindly skip this step

  1. Windows task schedule.
    Automatics task can run only when I set on task schedule: “Run only when user is logged on”

Just Tigger from orchestrator. MAKE SURE YOUR ROBOT ID HAVE REMOTE LOGIC ACCESS.