What Brand/Model? Suburban or Atwood......XXXXX?
Spark electrode must be engulfed in main flame to prove it is lit.
When power is sent to spark electrode, power is sent to main gas valve solenoids for 6-8 seconds. When main flame lights a milivolt signal is sent back to control module to 'prove' main flame so power stays on gas valve and keeps it open.
You are getting spark so you are getting power to/thru module SO.......
These are the things to check before even considering the control module.
*Poor/corroded ground connections can cause problems------clean tighten ground connections
*Dirty contacts at plug in connector can cause problem...pull connector off and clean contacts with an eraser
*Spark electrode not being directly in path (engulfed) of main flame....no signal. Adjust so it is engulfed by main flame
*Spark electrode dirty...no signal. Remove and use emery cloth to clean off carbon
*Disrupted gas flow........remove burner tube and clean it out. Remove main gas orifice and clean with alcohol. Make sure burner tube is aligned----straight shot to spark electrode. And check that diffuser on end of burner tube is square with end of tube
*Blockage in combustion/exhaust 'U' tube.......with burner tube and spark electrode removed run a piece of wire thru chamber and then pull a rag back thru too clean out any debris (webs/bests etc.)