Didn't say what you're working on, but I assume this is an Onan diesel genny??
I believe the generator will shut down and error if it's not making the right voltage. So the generator must think everything is fine, and something has to be stopping the voltage from getting from the generator to your transfer switch.
Onan has a troubleshooting tree in the service manual. It basically says if your generator is running, look for an issue outside of the generator.
Are you sure the breaker on the generator is good and not tripped? Like others said, the other likely culprit is your transfer switch. See if you've got generator voltage inside the transfer switch. If not, pull the panel off the generator and confirm you've got voltage at the back of the breaker.
I had several random and mysterious instances of the the same problem you're describing and each time I found the main breaker on the generator had tripped with no apparent cause.
After the 3rd or 4th such occurrence I eventually found a cat footprint sliding down the panel and ending at the breaker post.
I hope you figure it out!
2003 Monaco Dynasty 42 Regal.