I am talking strictly about running your Robots locally.
I think I have just had this issue myself and it was solved by updating the packages, as per this post:
For me it happened on 2018.4.1 for a project that had old packages.
I have the project that is giving the error and there are two different errors depeding on the connection status with Orchestartor (when running projects locally):
With Robot connected to Orchestrator you get this:
With Robot disconnnected from Orchestrator you get this:
The solution is to update the UiAutomation package to the latest