Almost sounds like a short somewhere, draining the battery but also kicking a relay. A battery isn't going to have enough juice to start a bike then the bike die 30 seconds later.
If it were fuel, the bike would fire immediately with a shot of starting fluid.
If it were spark, the bike would still spray fuel via the accel pump spraying in the carb throat after shutting off, and the engine would just keep turning over.
This is "Troubleshooting-101".
“When the going gets weird, the weird turn professional....” ~ Hunter S. Thompson~
R.I.P. Rubberdown. 1971-2012