It's a small propane direct vent wall mounted heater. The pilot is running fine. I had been crossing wires between TH & the thermocouple on the gas valve but this has become unreliable & the main burner won't always light. I give the gas valve a tap then it works fine, for a week or two. Is there a way to 'service' the solenoid in the gas valve?
I have had moisture problems many times with gas furnaces. Some furnaces gas lines have a drip leg after the shutoff valve, this leg is a 4-12” leg going down that is capped. This is there to catch water and rust from getting into the valve. If no drip leg moisture gets into the valve and the moisture hangs the valve up and a drop of water on a orifice can stop the gas flow since the orifice is small and water is ~200x denser than air.
Moisture can be the issue if you do not have a drip leg it may help to install one if you have a drip leg turn off the gas prior to the leg and clean it out to see if this helps. I always use gas rated pipe dope and a bubble solution to test for leaks after cleaning.
This if moisture is the issue once dried out the valve will usually operate normally or have for me , I lived at the bottom of a long run and had to clean my drip leg several times a year.