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.