Hi, I am having an issue with one of our processes. It’s a bot that runs for approximately 4 hours overnight. It has been running for 2 years now, and recently (1 month ago) it started failing with the following error after 1-2 hour running:
Cannot bring the target application in foreground because the Windows session is locked.
I understood that the windows sessions was getting locked since it is a long run. I’ve tried setting the sleep setting in RDP to “never sleep” but was still getting the error. I then tried changing the settings in orchestrator for the robot “login to console” = TRUE. This worked for 1 week, but yesterday the process could not even start, giving me this error: Could not start executor. The requested resource is in use. (0x800700AA).
I tried setting the “login to console” back to false, but it gave me the session locked error again after 1 hour running. I am not sure what to do, if anyone can please help.
Hi @Anil_G , yes it is in service mode. I switched the login to console to false, as it was previously set up, but I am getting the following error after an hour or so: Cannot bring the target application in foreground because the Windows session is locked.
The sessions won’t get locked because it is a long running process. It’s a virtual session (RDP).
It sounds like someone has remoted into the server and just closed the RDP window instead of signing out. This leaves the session active and interferes with the correct functioning of UI automation. Whenever you remote into the server you must SIGN OUT when you’re done.
Log into your server as the robot account and then click Start and SIGN OUT. Now run your job.
Also, make sure you have Robot installed on the server in service mode, not user mode.
You do not want to use “log in to console” as there is only one console session available on a server. Your problem is something else.
I have something similar, no one is logging in and the robot is in service mode (I have installed it myself). I had the resolution preset to 1920*1080, but no depth. So what I am trying at the moment is setting the resolution depth as well. Similarly to this: