This error shows up if UIVision inside the browser is not ready in time for the command line. So it has nothing to do with the macro, it happens before UIVision IDE even opens. As you observed, it happens mostly if the browser is really slow - but actually it should not happen at all. It clearly is a bug.
Question: For the command line, are you using the new method with the ui.vision.html file?