Cannot bring the target application in foreground because the Windows session is locked

I have a remote server. The UIPAth assistant is located here. Robots that will not be used for my remote server this will be used
“Cannot bring the target application in foreground because the Windows session is locked.”

Hello @serdarkavrazli
Kindly refer this, you may got some idea

Hi @serdarkavrazli

Can you check your UiPath run as service mode?
We can check it if UiPath.Service.Host.exe is running or not in Task Manager of OS.

Regards
Gokul

Assistant has nothing to do with unattended automations.

Manually log into the server via RDP, using the same account(s) as the robot, and then SIGN OUT completely from the start menu. Do not just close the RDP window. This leaves the session active but in a state similar to being locked, and interferes with jobs.

In general, it is best practice that humans do not log into your automation server(s). If they do for some reason (testing, troubleshooting, etc) they must LOG OUT completely, not just close the RDP window.

1 Like

Hi guys, I got the same issue. Here’s my situation:

  • I used the community cloud orchestrator
  • The VM doesn’t have a password
  • When I sign out of the user, the unattended job CANNOT start, and on Orchestrator, the robot appears to be unlicensed
    image 422x189
  • When I lock the screen, the unattended job CAN start, but run into the exception “Cannot bring the target application in foreground because the Windows session is locked.”
  • Sometimes, the UiPath Assistant suddenly losts connection

  • I tried to uninstall and reinstall UiPath Studio, but there’s no screen to choose service mode or user mode. It goes straight to User mode
    Please give me some instructions, it really affects my daily automation

Hello! I also had the same problem, a remote server, using RDP to configure. Started to get “Cannot bring the target application in foreground because the Windows session is locked.” when trying to run unattended processes after i disconnected the RDP. I solved it by installing VNC and using that instead, guess the RDP locks the computer when disconnecting when VNC doesnt do that. Hope it helps!

Regards
Peter

Hello

u are sure it is resolved by using vnc ?
and for type mode (for me unable to change it from user into service) from panel not showing me the type

Can u give us please more details how resolving the issue

Best regards