Loose connection, spark plug, bad fuel. If it's turning over, then it doesn't sound like a battery or alternator issue, but you could try measuring the voltage or hook it up to another battery.
I had the same thing happen to me. Rode for about 20 min's and died. Started back up after about 10 min's. Then went for about a mile then died. Started again after 10 min's. Then I towed it. It pulled an o2 sensor code .Took it to the dealer and they cleared the code and said it was ok? I changed the plug (it was black as night) and have been putting hi test in. So far so good. Don't know? I hate having to worry if it's gonna die at any minute. Going to ride to Cambria in the am. Wish me luck.I bought this bike for my grandson last fall with only 1300 miles on it. He is 16 and got his motorcycle permit 2 weeks ago. We we're on our 2nd ride when I looked back after rounding a corner and he was not there. I turned around and found him parked on the side of the road not running. He said it just started slowly down and died. It has a half tank of gas and I can hear the fuel pump pressure up when I turn the key on. It turns over fine but doesn't even try to fire up. He and I had planed to ride all weekend and need less to say he's pretty disappointed. I have owned BMWs for the last 45 years, mostly for their dependability. Does anyone have any suggestions on what could have failed? Since it's out of warranty I dread taking it to a dealer. I usually do all of my maintenance, my current ride is a 2016 R1200R and it's been trouble free. Any help on this would be appreciated.
I will go out of Tempelton ,Santa Rita Rd to Cayucos then to Cambria. And back 46. Or head to San Luis To Lopez to high mountain to pozo and take parkhill rod to 58 and head back to la panza.Cambria? Been epic weather if a little cool at Ocean. Do you go out Adalade Klau Mine on the red dirt Road who’s name escapes me? Ends up on Cypress Mountain into Cambria?