According to this Microsoft document, processing a cube will only process "unprocessed dimensions", and this is why you're getting the error. If you want to avoid it, you should either process your dimensions explicitly first, or process the SSAS database which in turn will process all objects contained within it.