I have been working on this automation that generates a report from an online ticketing tool and then stores the excel report in a folder, from where the PowerBI file has to be opened. Once open, refresh button needs to be pressed. Followed by saving the file.
While running the automation from orchestrator, my job is failing with the below error.
“Use Application: pbidesktop.exe: Cannot bring the target application in foreground because the Windows session is locked.”
I am running this task in a remote server in unattended mode. My all the other tasks like manupulating excel sheets, browsing to a location in the web, etc is working. Except for PowerBI.
FYI, when I am logged in to the remote server, the process completes normally.
Please help, as I am stuck resolving this issue for over 16 hours now.
As mentioned earlier, I am not seeing any error while running the sequence while I am logged in and the task is completing successfully. But in unattended mode, the same is not happening. Please find below the screenshot of the error available in the orchestrator log.
ok i understood what is the error .
In unattended mode , when your screen goes off then only this error comes.
So please make sure that your remote server is always ON means visible.
Thanks for the response. I have other jobs running in unattended mode, that opens chrome, download excel reports, manipulate them, etc. with the same setup in unattended mode. Could you please let me know why the other tasks work but not this one?
Appreciate your replies! Thanks!
hello @jaya.das
As mentioned before your error is that the target application couldnt find in the foreground screen right?
that means whether the screen comes off or selectors issue …
Can you please check the selectors you have provided and while the error comes.
Thanks. I am pretty new to UIpath, so I am unable to understand what will be the correct selector. Please find below the screenshots for the activity where the sequence is failing.
Thankyou for all your help. To anyone that faces similar issues in future, here is what i did.
I noticed that, in my server, I had installed UIpath in usermode. You can check it out by going to task manager, and check for Uipath Service Host , If not present, you will need to uninstall the UIpath and install it back in Service mode (Recommended for Advanced Users → Unattended mode). Once done, create a new machine in your orchestrator, generate the machine key. And use the key in Uipath assistant to connect the same. After the connection is done, I was able to run the application with server locked but was facing issue when I had to close a dialog button after a process. For that, as @Sree_Krishnan_vellinezhi suggested, I used the CV activities for clicking the button. Thanks @Sree_Krishnan_vellinezhi , your suggestions really helped. Thanks again.