something that comes to mind as possible cause for a dock not stably registering a connection, as your failed attempt to flash firmware in the screenshot posted, is that it's not getting enough power.
Make sure to use an official PSU (2A or 2.5A), and switch the max current on for the USB port. You can achieve the later using:
curl -sS get.pimoroni.com/getstarted | bash