check your sidestand switch
check it's appearance, tightness, connections and if you have a multimeter check it's function...and wiggle it about to make sure it doesnt affect the reading! Spray it with WD40 pehaps
you can try bypassing it by disconnecting it and bridging out the connectors on the loom, if the bike works now you need a new stand switch and i am NOT recommending you should ride with it disconnected until you get another, that one is up to you