If your Canon M50 seems to be disconnecting or powering off by itself, check these items:
Check to see if either the Camera Power cable (this plugs in at the bottom) or the Camera USB cable (this plugs in at the side of the camera) is loose or faulty. A loose connection will be evident if wiggling the Camera Power cable causes the camera to turn on and off, or if wiggling the Camera USB cable causes Windows to lose or gain connection.
Consult HootBooth Support if you suspect a loose connection.
Ensure Auto-Power off is disabled:
With the Camera USB cable unplugged, press the menu button at the bottom right
You will see the menu come up on the camera screen. Use the buttons around the Q-set button to navigate to the yellow wrench, tab 2, as shown below:
Select 'Power saving' (press the Q-set button) and ensure 'Auto power off' is set to Disable as shown below:
You may now re-connect the Camera USB cable.