I had an old Whirlpool with the same problem. As it was old, I junked it and bought a new Kenmore top of the line. After 10 months it had the same problem! In warranty, repair person came out -- gas would fire up and quit after 30 seconds or so. Turned out it was the solenoid valve, and she tested it for continuity. The bad one was flaky -- often indicated an open circuit --. The new one was consistently low ohms. So if I were you, I'd pull the valve wires off and test the continuity through the coils, maybe tapping the coils to see if you have an intermittent or something. Good luck!