i‘ve had this problem two times.
First time the mud defender i have installed killed one little cable between the motor and the controller. The second time it was more difficult. qicycle app beta told me that one battery cell had 41volts, the other 0 volts. ….but the battery was working in another bike.
I have changed the integrated cable, then the controler, nothing. At last i have changed the computer at the handlebar. That‘s it. The computer was okay, only the yellow cable was broken. Folding a bike is no fun for the cables.
Hope i could help you.