Robot 21.10 crashes when trying to start job from the command line

I am getting following error when running robot from command line:

RemoteException wrapping System.InvalidCastException: Unable to cast object of type ‘UiPath.Service.PasswordCredential’ to type ‘UiPath.Service.IdentityCredential’.
at UiPath.Service.Job.StartAsync(IUserCredential credential)

Any idea?

1 Like

Thanks for rising this @J0ska, our Robot team will have a look.

EDIT. It’s been identified as a bug. I made a topic out of your report and attached an internal ticket to it. I’ll update it as soon as this is fixed.

It looks like there is a possible workaround until the fix is live.

Please try the following:

  • Open Credential Manager from the Start Menu
  • In Generic credentials, look for a credential that looks like “UiPath:user=…” and remove it

With this wouraround will the job run unattended in background?
Not important for LAB but very important for my production…


@J0ska , could you please explain to us what exactly are you trying to achieve?

Hi @radutzp, in production I am running unattended robot scheduled via Windows Scheduler. So for me is essential that robot will run from command line in background.

Hi @J0ska

The latest 2021.10 version follows our current licensing which only offers scheduling of your unattended processes via Orchestrator (either on-prem or cloud).

The windows scheduler method was a workaround that was not officially supported for quite some time now and the recent improvements to the Robot caused some breaking changes in terms of running an unattended robot using this method with the locked screen.

It should in theory still work without locking your screen.