Often it will be debris build up in the throat of the pilot assy cobra head. The pilot gas comes out but is deflected away from the spark path enough to make ignition intermitant or not at all. With the power off, see if a small screwdriver can scrape away any build up and then give it a good blow with a straw.
In the field I also find cobra heads that are loose and have slipped slightly out the original position or the electrode needing to be re positioned deeper into the pilot gas path.
Also make sure that the entire wire from the ignition control to the igniter is positioned to be as air insulated from metal as is possible.
And is none of this fixes it then you can try to use the pilot gas pressure to dislodge
any limiting orifice debris by using a heavy screwdriver to rap on the pilot assy when it's attempting to light. Strike only the metal pilot assy base as you would hold a pool cue and use only as much force as you might use to knock on a front door. The vibration combined with the pilot gas pressure will often clear the orifice of debris. If it was pilot orifice debris then the pilot flame will enlargen when cleared.
Only do any of this if you have nothing left to lose in trying, because these attempts may also stop it from working completely..