Yesterday I was waiting for my wife to get out of her work and when I tried to start my bike, at the very moment I pressed the start button, it all went off. All the lights, the cockpit just went off. Moving the key to "off" and "on" again didn't do anything. I thought a fuse got broken and then I opened the battery compartment and opened the fuses box. All the fuses were good. Tried to turn the key to on again and the cockpit lighted up, then the bike turned on like usual. It then did it almost all the times I turned off the bike and tried to turn it on again, and to make it start I had to open the battery compartment and simply move the red cable that goes to the battery. I thought about a broken cable, but it's strange that every time by just moving it the bike starts. Moreover, the cockpit always lights up when I turn the key, it's when I press the start button that everything goes off. What could it be?
It sounds like you have a bad connection. I would start with cleaning the battery terminals, the connectors on the end of the wire, and making sure the cables are tightened down properly. If the problem continues, you'll need to start checking the system to see where you have power and where you don't. Work your way from the battery toward ground on some of the primary circuits to see how far you get and still see 12v. That will give you an idea of where the bike doesn't have power where it should, and where the connection to the +12v post on the battery is problematic.