Uipath Robot Error - Invalid token specified: Cannot read property 'replace' of undefined

Hi
Try reconnecting your robot with orchestrator and ensure if machine key is used it is mentioned correct

And have a view on this thread more ideas
UiPath Robot Error - Cannot Read Property xxx Of Null - #16 by xymanuel

Cheers @joaonuno.costa