Error pops up every time when launching the "UiPath Assistant" app - Invalid token specified: Cannot read property 'replace' of undefined

We use the enterprise edition of UiPath. Versions are as below
Orchestrator: 2019.10.18
Assistant: 2021.10.4

Recently, every time when the “UiPath Assistant” app is launched, the error “Invalid token specified: Cannot read property ‘replace’ of undefined” pops up. Although the error can be escaped by clicking OK twice, this can be disturbing.

Is there any solution to solve this?

You should consider upgrading your Orchestrator (to 2022.4.3 or 2021.10.7) as in less than 2 months it will be out of support.

Then you can upgrade your Robot also (2022.4.5 or 2021.10.8)