Happened to a friend of mine... The ONAN generators have a small computer inside, it measures many things and it will report why it shut down.. In their case the code translated to "low-Battery/Not cranking fast enough) even though the engine actually started.. The problem was with the generator part. You see, the computer was looking for power, and not seeing it, decided the generator was not running, so it shut it down. They had bad brushes.
NOw... I'm not saying you have the same problem.. I can think of a whole range of issues that would cvause the computer not to sense power being generated, Including something hard to fix... Like a screw loose. (Seen that on a vintage ONAN in fact).
least anyone think I'm claiming to be an expert... Those are the only two "Failed" Onan generators I have ever seen with my own eyes, and I only worked on the vintage one.