If there is the slightest dampness on the controller PCB, usually in a aluminium box, which are sometimes not completely waterproof, that dampness can turn on a Transistor, FET or MOSFET, when it should be off.
Do place the bike in a warm room, next to a radiator, open that box and let it all warm up for a few days.
It is also possible that a transistor has been damaged of course.
There are nice little testers for e-bikes, that are really cheap and apparently easy to use, see what you think:-
I have heard that some bikes have non standard connectors, so you may need to make up some simple adapters for that, but if you are lucky, your bike will follow the standard connectors.
I have yet to get one to play with, but a friend uses one for business and reckons it saves him hours of work time! Even though he used standard meters to check out for faults before, it gives him the place to look at, repair or replace.
Anyway, it should help you to identify a defective controller error, or motor winding defect or hall effect sensors and can check throttles and brake lever switches switches as well (from my memory only).
They cost under 10 UK Pounds on ebay.
Most people work at an hourly rate higher than that!
regards
Andy