it will still spark if no gas, as boiler cant identify gas flow but, if you can affect it by banging on the control box then pos pcb/aps faulty, you need to confirm 240v at gas valve when fault occurs, if 240v present then gas valve at fault, but get a gas engineer in to fix!