Command line: Could not log in user to Orchestrator

I have a command line task which is basically

\AppData\Local\UiPath\app-21.4.4\UiRobot.exe -f \Main.xaml

The first time I run it from the command line after a few seconds, I get the error “Could not log in user to Orchestrator”

The second time I run it, it works perfectly.

This result happens 100% of the time.

Hi,

It might be because it takes some time to launch RobotService.
(in the 2nd running, the service is already running.)
So can you try the following steps?

First, run UiRobot.exe without option. Then robot service will start.
Next, wait a short time.(30secs?)
Finally run your workflow.

Regards,

Thanks for the reply Yoichi.

I tried this several times in the last few days and there is no difference. I ran UiRobot.exe then paused the script for 60 seconds, which is much longer than the delay between me running it the first and second times, but still the same error message